prevent duplicate pipelines in MRs

This commit is contained in:
proletarius101 2022-10-31 22:00:56 +00:00
parent c03ead5470
commit 4e40bd1e10

View file

@ -1,11 +1,13 @@
include:
- template: Security/SAST.gitlab-ci.yml
# copied from https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Workflows/MergeRequest-Pipelines.gitlab-ci.yml
workflow:
rules:
# required to enable merge request pipelines: https://docs.gitlab.com/ee/ci/pipelines/merge_request_pipelines.html#prerequisites
- if: $CI_MERGE_REQUEST_IID
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
# to prevent duplicate pipelines in MRs: https://docs.gitlab.com/ee/ci/yaml/workflow.html#switch-between-branch-pipelines-and-merge-request-pipelines
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
when: never
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH