Set default branch name during CI pipeline using CI_COMMIT_REF_NAME or fallback to release

This commit is contained in:
2025-08-19 11:25:47 +02:00
parent 957039edac
commit 5ddc60f1c6
+2
View File
@@ -80,6 +80,8 @@ perform_release:
cd ${GITLAB_CLONE_DIR}
git config --global user.name "${GITLAB_USERNAME}"
git config --global user.email "${GITLAB_USEREMAIL}"
export CI_REF_NAME=${CI_COMMIT_REF_NAME:-release}
git checkout -B ${CI_REF_NAME}
# config auth
git remote set-url origin "https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/${CI_PROJECT_PATH}.git"