GitLab CI: Make sure GITLAB_TOKEN is set in the Commit Check job

This commit is contained in:
Gerald Combs 2023-11-03 22:17:40 +01:00
parent 0f38e1662f
commit 9433d37731
1 changed files with 2 additions and 0 deletions

View File

@ -661,6 +661,8 @@ Commit Check:
variables:
GITLAB_REPO: "$CI_MERGE_REQUEST_PROJECT_URL"
script:
# GITLAB_TOKEN is set in wireshark/wireshark. Use CI_JOB_TOKEN in forks.
- if [ -z "$GITLAB_TOKEN" ]; then GITLAB_TOKEN=$CI_JOB_TOKEN ; fi
- (cd /tmp ; curl -JLO https://gitlab.com/gitlab-org/cli/-/releases/v1.34.0/downloads/glab_1.34.0_Linux_x86_64.deb)
- dpkg --install /tmp/glab_1.34.0_Linux_x86_64.deb
- glab auth status