mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-20 06:50:05 +01:00
gitlab CI: don't run MR pipelines in forks
Commit originally by Simon Ser in wayland/wayland-protocols!305. Currently our CI setup has a downside: for each push on a merge request, two pipelines are triggered. The first is triggered in the context of the forked repository, and the second is triggered in the context of the MR in the parent repository. Replace the workflow rules with the ones in the official docs [1], so that a branch pipeline isn't triggered when a MR exists for that branch. [1]: https://docs.gitlab.com/ee/ci/yaml/workflow.html#switch-between-branch-pipelines-and-merge-request-pipelines Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/993>
This commit is contained in:
parent
a191a46a78
commit
ace22ad0b0
2 changed files with 8 additions and 4 deletions
|
|
@ -56,8 +56,10 @@ include:
|
||||||
|
|
||||||
workflow:
|
workflow:
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||||
- if: $CI_PIPELINE_SOURCE == 'push'
|
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
|
||||||
|
when: never
|
||||||
|
- if: $CI_COMMIT_BRANCH
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- sanity check # CI/commit checks
|
- sanity check # CI/commit checks
|
||||||
|
|
|
||||||
|
|
@ -50,8 +50,10 @@ include:
|
||||||
|
|
||||||
workflow:
|
workflow:
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||||
- if: $CI_PIPELINE_SOURCE == 'push'
|
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
|
||||||
|
when: never
|
||||||
|
- if: $CI_COMMIT_BRANCH
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- sanity check # CI/commit checks
|
- sanity check # CI/commit checks
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue