ci: Add "is master branch of main project" YAML anchor
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6566>
This commit is contained in:
parent
c3ae82be24
commit
ac56d66992
|
@ -40,6 +40,15 @@ stages:
|
|||
if: &is-scheduled-pipeline '$CI_PIPELINE_SOURCE == "schedule"'
|
||||
when: never
|
||||
|
||||
# YAML anchors for rule conditions
|
||||
# --------------------------------
|
||||
.rules-anchors:
|
||||
rules:
|
||||
# Pipeline runs for the master branch of the main project
|
||||
- if: &is-main-master '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_REF_NAME == "master"'
|
||||
when: always
|
||||
|
||||
|
||||
.docs-base:
|
||||
extends: .ci-run-policy
|
||||
image: alpine
|
||||
|
@ -56,7 +65,7 @@ pages:
|
|||
- public
|
||||
rules:
|
||||
- *ignore_scheduled_pipelines
|
||||
- if: '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_REF_NAME == "master"'
|
||||
- if: *is-main-master
|
||||
changes: &docs-or-ci
|
||||
- docs/**/*
|
||||
- .gitlab-ci.yml
|
||||
|
|
Loading…
Reference in New Issue