summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorJordan Petridis <jordan@centricular.com>2023-04-19 22:39:41 +0300
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2023-04-25 10:17:30 +0000
commit55d6c229bcf892783aa62dca6c83cce1144ca3e7 (patch)
tree35722911d740b918e94683666867fea2446c0bb2 /.gitlab-ci.yml
parentba53322b199ef13b741a408ab5bad2d2cf35512e (diff)
ci: Don't trigger Branch pipelines if there is an open MR
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1164>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml9
1 files changed, 6 insertions, 3 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1d9d126c..8261396c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -24,10 +24,13 @@ variables:
value: ""
workflow:
+ # https://docs.gitlab.com/ee/ci/yaml/index.html#switch-between-branch-pipelines-and-merge-request-pipelines
rules:
- - if: $CI_MERGE_REQUEST_IID
- - if: $CI_COMMIT_TAG
- - if: $CI_COMMIT_BRANCH
+ - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
+ - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
+ when: never
+ - if: '$CI_COMMIT_TAG'
+ - if: '$CI_COMMIT_BRANCH'
#
# Global CI policy