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: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3370>
This commit is contained in:
parent
a9cb754d62
commit
92f78a2a06
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user