From d757aabd50c27e4693721c0bd35c046ddfe7e22e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Fri, 5 Jan 2024 10:50:34 +0100 Subject: [PATCH] ci: Prevent duplicate pipelines for MRs Do not create a pipeline for $CI_PIPELINE_SOURCE == 'push' if $CI_OPEN_MERGE_REQUESTS is set, which means there are open MRs using the branch as the source. --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7ec060139..423a47acb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -147,4 +147,6 @@ check-merge-request: workflow: rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + - if: $CI_OPEN_MERGE_REQUESTS + when: never - if: $CI_PIPELINE_SOURCE == 'push'