1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-17 20:47:50 +02:00

feat: login into gitlab registry (#3296)

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
Carlos Alexandro Becker 2022-08-07 22:39:03 -03:00 committed by GitHub
parent 2fecd94569
commit 042c63884c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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