🚧 GitLab CI Test: Trigger only on default branch (and do not hardcode it)

pull/111/head
Mike Gerber 12 months ago
parent 83cef3106f
commit 5eba65f097

@ -11,3 +11,5 @@ mirror:
stage: triggers stage: triggers
trigger: trigger:
include: .gitlab/mirror.yml include: .gitlab/mirror.yml
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH

@ -17,8 +17,10 @@ pull-github:
script: script:
- whoami; env - whoami; env
- if [ -z "$CI_COMMIT_BRANCH" ]; then echo "Not on a branch" >&2; exit 3; fi
- git remote remove github 2>/dev/null || true - git remote remove github 2>/dev/null || true
- git remote add github https://github.com/qurator-spk/dinglehopper.git - git remote add github https://github.com/qurator-spk/dinglehopper.git
- git remote -v - git remote -v
- git pull github master - git pull github "$CI_COMMIT_BRANCH"

Loading…
Cancel
Save