mirror of
https://gitlab.com/famedly/conduit.git
synced 2024-12-26 21:04:40 +01:00
fix(ci): avoid duplicate pipelines
This commit is contained in:
parent
88fbd5b294
commit
4af691d737
1 changed files with 14 additions and 0 deletions
|
@ -7,6 +7,15 @@ variables:
|
||||||
# Makes some things print in color
|
# Makes some things print in color
|
||||||
TERM: ansi
|
TERM: ansi
|
||||||
|
|
||||||
|
# Avoid duplicate pipelines
|
||||||
|
# See: https://docs.gitlab.com/ee/ci/yaml/workflow.html#switch-between-branch-pipelines-and-merge-request-pipelines
|
||||||
|
workflow:
|
||||||
|
rules:
|
||||||
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||||
|
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
|
||||||
|
when: never
|
||||||
|
- if: $CI
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
# Enable nix-command and flakes
|
# Enable nix-command and flakes
|
||||||
- if command -v nix > /dev/null; then echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf; fi
|
- if command -v nix > /dev/null; then echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf; fi
|
||||||
|
@ -52,10 +61,14 @@ ci:
|
||||||
rules:
|
rules:
|
||||||
# CI on upstream runners (only available for maintainers)
|
# CI on upstream runners (only available for maintainers)
|
||||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event" && $IS_UPSTREAM_CI == "true"
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event" && $IS_UPSTREAM_CI == "true"
|
||||||
|
# Manual CI on unprotected branches that are not MRs
|
||||||
|
- if: $CI_PIPELINE_SOURCE != "merge_request_event" && $CI_COMMIT_REF_PROTECTED == "false"
|
||||||
|
when: manual
|
||||||
# Manual CI on forks
|
# Manual CI on forks
|
||||||
- if: $IS_UPSTREAM_CI != "true"
|
- if: $IS_UPSTREAM_CI != "true"
|
||||||
when: manual
|
when: manual
|
||||||
- if: $CI
|
- if: $CI
|
||||||
|
interruptible: true
|
||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
stage: artifacts
|
stage: artifacts
|
||||||
|
@ -100,6 +113,7 @@ artifacts:
|
||||||
when: manual
|
when: manual
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
- if: $CI
|
- if: $CI
|
||||||
|
interruptible: true
|
||||||
|
|
||||||
.push-oci-image:
|
.push-oci-image:
|
||||||
stage: publish
|
stage: publish
|
||||||
|
|
Loading…
Reference in a new issue