Set default branch name during CI pipeline using CI_COMMIT_REF_NAME or fallback to release
This commit is contained in:
@@ -80,6 +80,8 @@ perform_release:
|
|||||||
cd ${GITLAB_CLONE_DIR}
|
cd ${GITLAB_CLONE_DIR}
|
||||||
git config --global user.name "${GITLAB_USERNAME}"
|
git config --global user.name "${GITLAB_USERNAME}"
|
||||||
git config --global user.email "${GITLAB_USEREMAIL}"
|
git config --global user.email "${GITLAB_USEREMAIL}"
|
||||||
|
export CI_REF_NAME=${CI_COMMIT_REF_NAME:-release}
|
||||||
|
git checkout -B ${CI_REF_NAME}
|
||||||
|
|
||||||
# config auth
|
# config auth
|
||||||
git remote set-url origin "https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/${CI_PROJECT_PATH}.git"
|
git remote set-url origin "https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/${CI_PROJECT_PATH}.git"
|
||||||
|
|||||||
Reference in New Issue
Block a user