Commit bc43767f authored by Joseph Weston's avatar Joseph Weston

CI: add mirroring between kwant gitlab, gitlab.com and github.com

parent 598bfa55
Pipeline #1426 passed with stage
in 32 seconds
......@@ -6,3 +6,20 @@ python3:
script:
- python3 setup.py build_ext -i
- python3 test_tinyarray.py
mirror:
only:
- branches@kwant/tinyarray
variables:
REPOS: "git@github.com:kwant-project/tinyarray.git git@gitlab.com:kwant/tinyarray.git"
before_script:
- HOSTS=$(for REPO in $REPOS; do echo ${REPO%:*} | cut -d'@' -f2; done)
- mkdir ~/.ssh && chmod 700 ~/.ssh
- for HOST in $HOSTS; do ssh-keyscan $HOST >> ~/.ssh/known_hosts; done
- echo "$DEPLOY_KEY" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
after_script:
- rm -rf ~/.ssh
script:
- ORIGIN_URL=$(git config --get remote.origin.url)
- cd $(mktemp -d); git clone --bare $ORIGIN_URL .
- for REPO in $REPOS; do git push --mirror $REPO; done
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