Commit 3b420953 authored by Wouter's avatar Wouter

Mirror to GitHub through GitLab CI

parent 0b43de56
Pipeline #175 passed with stages
in 16 seconds
stages:
- mirror
- build
- deploy
Mirror to github:
stage: mirror
script:
- mkdir -p $HOME/.ssh
- echo "${GITHUB_DEPLOY_KEY}" > $HOME/.ssh/github
- chmod 0600 $HOME/.ssh/github
- mv $HOME/.ssh/config $HOME/.ssh/config~ || /bin/true
- echo "host github.com" > $HOME/.ssh/config
- echo " IdentityFile %d/.ssh/github" >> $HOME/.ssh/config
- echo " PubKeyAuthentication yes" >> $HOME/.ssh/config
- git remote add --mirror=push github git@github.com:${GITHUB_REPOSITORY} || /bin/true
- git push github
after_script:
- mv $HOME/.ssh/config~ $HOME/.ssh/config || /bin/true
- rm $HOME/.ssh/github
Build master:
stage: build
script:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment