ci: use CI_JOB_TOKEN

This commit is contained in:
naskya 2024-05-06 18:06:56 +09:00
parent d582a84c57
commit c6212ff8f4
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C

View file

@ -43,9 +43,9 @@ auto_update:
script:
# setup git
- apk add git
- git config user.name "${GITLAB_USER_NAME}"
- git config user.email "${GITLAB_USER_EMAIL}"
- git remote set-url origin "${CI_MERGE_REQUEST_SOURCE_PROJECT_URL}"
- git config user.name 'GitLab CI'
- git config user.email 'noreply@firefish.dev'
- git remote set-url origin "https://gitlab-ci-token:${CI_JOB_TOKEN}@firefish.dev/${CI_MERGE_REQUEST_PROJECT_PATH}"
- git fetch origin
- git switch "${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}"
# update pnpm lockfile