Skip to content

Commit 3fcc4ad

Browse files
authored
Merge pull request #9 from EMSL-Computing/main
Merge with main
2 parents 6cf815f + e7c359f commit 3fcc4ad

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/mirror.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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

0 commit comments

Comments
 (0)