Commit 314546a8 authored by Wouter's avatar Wouter

Add mirror to github step in CI

Because the service is not available in GitLab CE :(
parent 16db8c16
stages:
- mirror
- build
- deploy
Mirror to github:
stage: mirror
script:
- mkdir -p $HOME/.ssh
- echo "${GITHUB_DEPLOY_KEY}" > $HOME/.ssh/github
- mv $HOME/.ssh/config $HOME/.ssh/config~ || /bin/true
- echo "host github.com" > $HOME/.ssh/config
- echo " IdentityFile %d/.ssh/id_rsa.github" >> $HOME/.ssh/config
- echo " PubKeyAuthentication yes" >> $HOME/.ssh/config
- git remote add github git@github.com:${GITHUB_REPOSITORY} || /bin/true
- git push --mirror github
- 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