Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
timothe
duniter
Commits
230dea23
Commit
230dea23
authored
Aug 21, 2018
by
Cédric Moreau
Browse files
[fix] Do not push to github
parent
d4476672
Changes
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
230dea23
stages
:
-
github-sync
-
build
-
test
-
pages
...
...
@@ -7,26 +6,26 @@ stages:
-
prerelease
-
release
push_to_github
:
stage
:
github-sync
variables
:
GIT_STRATEGY
:
none
tags
:
-
github
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 "contact@duniter.org"
-
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 $?"
only
:
-
master
-
dev
#
push_to_github:
#
stage: github-sync
#
variables:
#
GIT_STRATEGY: none
#
tags:
#
- github
#
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 "contact@duniter.org"
#
- 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 $?"
#
only:
#
- master
#
- dev
.nvm_env
:
&nvm_env
tags
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment