Skip to content

Commit

Permalink
ci: update autotagging procedure
Browse files Browse the repository at this point in the history
  • Loading branch information
seppzer0 committed Dec 1, 2023
1 parent 167f0b1 commit 83cd8a8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 83cd8a8

Please sign in to comment.