You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dinglehopper/.gitlab/mirror.yml

48 lines
1.0 KiB
YAML

12 months ago
stages:
- check
- pull
- push
12 months ago
12 months ago
default:
image: debian
check:
stage: check
script:
- whoami; env
- if [ -z "$CI_COMMIT_BRANCH" ]; then echo "Not on a branch" >&2; exit 3; fi
12 months ago
12 months ago
pull-gitlab:
stage: pull
script:
- echo "This is redundant"
12 months ago
pull-github:
stage: pull
before_script:
- apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
script:
- git remote remove github 2>/dev/null || true
- git remote add github https://github.com/qurator-spk/dinglehopper.git
- git remote -v
- git pull github "$CI_COMMIT_BRANCH"
12 months ago
push-gitlab:
stage: push
before_script:
- apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
script:
- git push origin "$CI_COMMIT_SHA":"$CI_COMMIT_BRANCH"
push-github:
stage: push
before_script:
- apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
script:
- git push github "$CI_COMMIT_SHA":"$CI_COMMIT_BRANCH"