From 92f78a2a0686fca202202a15618927e4e608dcd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 13 Jun 2024 17:46:16 +0200 Subject: [PATCH] ci: Use !reference tag for pipeline guard It's a bit more flexible than yaml anchors, and already used in mutter for the same purpose. Part-of: --- .gitlab-ci.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3668db8ab..3be8b519c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,7 +43,7 @@ workflow: - if: '$CI_COMMIT_TAG' - if: '$CI_COMMIT_BRANCH' -.pipeline_guard: &pipeline_guard +.pipeline-guard: rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - if: '$CI_COMMIT_TAG' @@ -94,7 +94,8 @@ check_commit_log: else echo "Not a merge request" ; fi - <<: *pipeline_guard + rules: + - !reference [.pipeline-guard, rules] artifacts: expire_in: 1 week paths: @@ -113,7 +114,8 @@ check-merge-request: else echo "Not a merge request" ; fi - <<: *pipeline_guard + rules: + - !reference [.pipeline-guard, rules] artifacts: expire_in: 1 week paths: