CI: Use yaml anchor for global before_script (MR 2297)

The local before_script variable overrides the global one, which I
assume wasn't the intent when the local before_script was added to
mr-settings. As such, add an achor to ensure that the global one is run
too.
This commit is contained in:
Newbyte 2024-04-16 17:31:00 +02:00 committed by Oliver Smith
parent ca844038f1
commit b7dd9bec69
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -9,7 +9,7 @@ workflow:
- if: $CI_COMMIT_BRANCH == 'master'
- if: $CI_COMMIT_BRANCH == 'wip'
before_script:
before_script: &global_before_scripts
- ".ci/note.sh"
- "echo 'https://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories"
- "adduser -D build"
@ -52,6 +52,7 @@ mr-settings:
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
before_script:
- *global_before_scripts
- "apk -q add python3"
- "wget -q 'https://gitlab.com/postmarketOS/ci-common/-/raw/master/check_mr_settings.py'"
script: