.gitlab-ci.yml 550 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
stages:
  - mirror


mirror repository:
    stage: mirror
    allow_failure: true
    variables:
      REPO: "git@github.com:quantum-tinkerer/research-docker.git"
    before_script:
11
12
13
      - mkdir ~/.ssh && chmod 700 ~/.ssh
      - ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
      - echo "$DEPLOY_KEY" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
14
    after_script:
15
      - rm -rf ~/.ssh
16
17
18
19
    script:
      - ORIGIN_URL=$(git config --get remote.origin.url)
      - cd $(mktemp -d); git clone --bare $ORIGIN_URL .
      - git push --mirror $REPO