Commit 0b559722 authored by Paul Colin Hennig's avatar Paul Colin Hennig 🏳️‍🌈
Browse files

Update .gitlab-ci.yml

parent 061fe0d3
......@@ -43,15 +43,15 @@ mirror:
- git config --global user.name "runner"
- git fetch --unshallow origin
- git remote remove origin
- git remote add origin https://firstdorsal:$GITHUB_TOKEN@github.com/$CI_PROJECT_PATH.git
- git remote add origin https://${USERNAME}:$GITHUB_TOKEN@github.com/$CI_PROJECT_PATH.git
- git add -A
- git commit -m "🤖 mirror [skip ci]"
- curl -u "firstdorsal:$GITHUB_TOKEN" https://api.github.com/user/repos -d "{\"name\":\"$CI_PROJECT_NAME\"}"
- curl -u "${USERNAME}:$GITHUB_TOKEN" https://api.github.com/user/repos -d "{\"name\":\"$CI_PROJECT_NAME\"}"
- curl --request PATCH -u "${USERNAME}:$GITHUB_TOKEN" https://api.github.com/repos/${USERNAME}/$CI_PROJECT_NAME -d "{\"description\":\"This is a mirror of ${CI_PROJECT_URL}\"}"
- git push --set-upstream origin HEAD:refs/heads/master -f
#gitlab
- git remote remove origin
- git remote add origin https://firstdorsal:$GITLAB_TOKEN@gitlab.com/$CI_PROJECT_PATH.git
- git remote add origin https://${USERNAME}:$GITLAB_TOKEN@gitlab.com/$CI_PROJECT_PATH.git
- curl --request POST "https://gitlab.com/api/v4/projects?visibility=public&private_token=$GITLAB_TOKEN&name=$CI_PROJECT_NAME" ; echo
- curl --request DELETE "https://gitlab.com/api/v4/projects/$CI_PROJECT_NAMESPACE%2F$CI_PROJECT_NAME/protected_branches/master?private_token=$GITLAB_TOKEN" ; echo
- git push --set-upstream origin HEAD:refs/heads/master -f
......
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