Resolve "Fix CI using expired Gitlab token"

This commit is contained in:
2026-01-15 08:50:57 +00:00
committed by Emergent Reasons
parent f009cd31da
commit a029b43fc4
2 changed files with 7 additions and 5 deletions
+4 -2
View File
@@ -97,8 +97,10 @@ publish:development:
- git config --global user.email "${GITLAB_USER_EMAIL}"
- git config --global user.name "${GITLAB_USER_NAME}"
# Configure git to push with CI token
- git remote set-url origin "https://gitlab-ci-token:$GL_TOKEN@$CI_SERVER_HOST/$CI_PROJECT_PATH.git"
# Configure git to push with CI token.
# CI_REPOSITORY_URL uses the CI_JOB_TOKEN to form the repository URL, in the format "https://gitlab-ci-token:$CI_JOB_TOKEN@gitlab.example.com/my-group/my-project.git"
# The CI_JOB_TOKEN is short lived and only valid for the duration of the CI/CD job.
- git remote set-url origin "${CI_REPOSITORY_URL}"
# Ensure full Git history so Lerna can detect changes
- git fetch --unshallow