Module: Mesa Branch: master Commit: ac56d6699270c0027563c3311fa8a5b418b481d0 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ac56d6699270c0027563c3311fa8a5b418b481d0
Author: Michel Dänzer <[email protected]> Date: Tue Sep 8 12:20:39 2020 +0200 ci: Add "is master branch of main project" YAML anchor Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6566> --- .gitlab-ci.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 39e710307ef..1508a33c602 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
