From efec576405db8794a292b2123a7d09fae1f3b339 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michel=20D=C3=A4nzer?= Date: Wed, 2 Sep 2020 18:35:32 +0200 Subject: [PATCH] ci: Prevent pages job from running in pre-merge pipelines Since pre-merge pipelines run in the "mesa" namespace now, the rule would have created the job if the source branch was named "master" (and the job might have updated the public website). Acked-by: Pierre-Eric Pelloux-Prayer Part-of: --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 076e64e..15eb5c8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -54,7 +54,7 @@ stages: - if: &is-forked-branch-or-pre-merge '$CI_PROJECT_NAMESPACE != "mesa" || $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME' when: manual # Pipeline runs for the master branch of the main project - - if: &is-main-master '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_REF_NAME == "master"' + - if: &is-main-master '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_REF_NAME == "master" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != "master"' when: always # Post-merge pipeline - if: &is-post-merge '$CI_PROJECT_NAMESPACE == "mesa" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME' -- 2.7.4