mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
ci triggered only for default branch or PR
This commit is contained in:
parent
e5a03cab11
commit
a8d31a5185
1 changed files with 9 additions and 0 deletions
|
@ -12,6 +12,15 @@ default:
|
||||||
# All jobs are interruptible by default
|
# All jobs are interruptible by default
|
||||||
interruptible: true
|
interruptible: true
|
||||||
|
|
||||||
|
# see: https://docs.gitlab.com/ee/ci/yaml/#switch-between-branch-pipelines-and-merge-request-pipelines
|
||||||
|
workflow:
|
||||||
|
rules:
|
||||||
|
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"' # If we move to gitlab one day
|
||||||
|
- if: '$CI_PIPELINE_SOURCE == "external_pull_request_event"' # For github PR
|
||||||
|
- if: '$CI_COMMIT_REF_NAME =~ /$CI_DEFAULT_BRANCH/ && $CI_PIPELINE_SOURCE == "push"' # If it's not the default branch and if it's a push, then do not trigger a build
|
||||||
|
when: never
|
||||||
|
- when: always
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
YNH_BUILD_DIR: "ynh-build"
|
YNH_BUILD_DIR: "ynh-build"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue