File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Mirror to NWBRaVE
2+ on :
3+ push :
4+ branches : ["**"]
5+ tags : ["**"]
6+ delete :
7+ branches : ["**"]
8+ tags : ["**"]
9+ workflow_dispatch :
10+
11+ concurrency :
12+ group : mirror
13+ cancel-in-progress : true
14+
15+ jobs :
16+ mirror :
17+ runs-on : ubuntu-latest
18+ steps :
19+ - name : Setup SSH for pushing to NWBRaVE
20+ env :
21+ MIRROR_SSH_KEY : ${{ secrets.MIRROR_SSH_KEY }}
22+ run : |
23+ set -euo pipefail
24+ if [ -z "$MIRROR_SSH_KEY" ]; then echo "Error: MIRROR_SSH_KEY secret is not set"; exit 1; fi
25+ mkdir -p ~/.ssh
26+ (umask 077; printf '%s\n' "$MIRROR_SSH_KEY" > ~/.ssh/id_ed25519)
27+ ssh-keyscan -t ed25519,ecdsa-sha2-nistp256,rsa github.com >> ~/.ssh/known_hosts
28+
29+ - name : Mirror branches and tags
30+ run : |
31+ set -euo pipefail
32+ git clone --mirror https://github.com/EMSL-Computing/grip-tomo.git repo.git
33+ cd repo.git
34+ git remote add dest git@github.com:NWBRaVE/grip-tomo.git
35+ # Push branches and tags, pruning deletions; exclude refs/pull/*
36+ git push dest 'refs/heads/*:refs/heads/*' 'refs/tags/*:refs/tags/*' --prune --force
You can’t perform that action at this time.
0 commit comments