Skip to content

Commit

Permalink
GitLab CI
Browse files Browse the repository at this point in the history
  • Loading branch information
c-geek committed Nov 24, 2017
1 parent f0e8dcb commit 0ba1e45
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
stages:
- github-sync

push_to_github:
stage: github-sync
variables:
GIT_STRATEGY: none
script:
- rm -rf ./*
- rm -rf .git
- git clone --mirror $CI_REPOSITORY_URL .
- git remote add github $GITHUB_URL_AND_KEY
- git config --global user.email "[email protected]"
- git config --global user.name "Duniter"
# Job would fail if we don't remove refs about pull requests
- bash -c "cat packed-refs | grep -v 'refs/pull' > packed-refs-new; echo 'Removed pull refs.'"
- mv packed-refs-new packed-refs
- bash -c "git push --force --mirror github 2>&1 | grep -v duniter-gitlab; echo $?"

0 comments on commit 0ba1e45

Please sign in to comment.