From 83cd8a87258ee2984f456883268bb150d9f4725c Mon Sep 17 00:00:00 2001 From: seppzer0 Date: Fri, 1 Dec 2023 13:24:02 +0200 Subject: [PATCH] ci: update autotagging procedure --- .gitlab-ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eb4939e..096172d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,12 +28,13 @@ job-tag: - job-build script: - USERNAME=$CUSTOM_CI_USERNAME - - PASSWD=$CUSTOM_CI_PASSWD + - PASSWORD=$CUSTOM_CI_PASSWORD + - EMAIL=$CUSTOM_CI_EMAIL - TAGNAME=$(sh scripts/get_version.sh) - - git config --global user.name "${GITLAB_USER_NAME}" - - git config --global user.email "${GITLAB_USER_EMAIL}" + - git config --global user.name "${USERNAME}" + - git config --global user.email "${EMAIL}" - git remote remove origin - - git remote add origin https://$USERNAME:$PASSWD@gitlab.com/$CI_PROJECT_PATH + - git remote add origin https://${USERNAME}:${PASSWORD}@gitlab.com/${CI_PROJECT_PATH} - if [ $(git tag | grep "$TAGNAME") ]; then echo "[ * ] Tag already exists, skipping.."; else git tag $TAGNAME && git push origin $TAGNAME; fi rules: - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH