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.
This commit is contained in:
Michel Dänzer 2024-01-05 10:50:34 +01:00 committed by Peter Hutterer
parent 995e60a919
commit d757aabd50

View File

@ -147,4 +147,6 @@ check-merge-request:
workflow: workflow:
rules: rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
- if: $CI_OPEN_MERGE_REQUESTS
when: never
- if: $CI_PIPELINE_SOURCE == 'push' - if: $CI_PIPELINE_SOURCE == 'push'