From 042c63884c3c1cbf8257571b18b2df82994bb947 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Sun, 7 Aug 2022 22:39:03 -0300 Subject: [PATCH] feat: login into gitlab registry (#3296) Signed-off-by: Carlos A Becker --- scripts/entrypoint.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh index dceacea1c43..2a99e77e0fb 100644 --- a/scripts/entrypoint.sh +++ b/scripts/entrypoint.sh @@ -20,7 +20,12 @@ if [ -n "$GITHUB_TOKEN" ]; then echo "$GITHUB_TOKEN" | docker login ghcr.io -u docker --password-stdin fi -# prevents git from complaining about unsafe dir. especially when using github actions +if [ -n "$CI_REGISTRY_PASSWORD" ]; then + # Log into GitLab registry + echo "$CI_REGISTRY_PASSWORD" | docker login "$CI_REGISTRY" -u "$CI_REGISTRY_USER" --password-stdin +fi + +# prevents git from complaining about unsafe dir, specially when using github actions git config --global --add safe.directory . # shellcheck disable=SC2068