Skip to content

Commit 335a659

Browse files
hyperpolymathclaude
andcommitted
chore: sync mirror workflow with rsr-template-repo
Updated checkout to v6.0.2, added per-forge org variables with three-tier fallback, added all 7 forge targets from template. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 00aa776 commit 335a659

1 file changed

Lines changed: 27 additions & 21 deletions

File tree

.github/workflows/mirror.yml

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,122 +14,128 @@ jobs:
1414
runs-on: ubuntu-latest
1515
if: vars.GITLAB_MIRROR_ENABLED == 'true'
1616
steps:
17-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
17+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1818
with:
1919
fetch-depth: 0
2020

21-
- uses: webfactory/ssh-agent@dc588b651fe13675774614f8e6a936a468676387 # v0.9.0
21+
- uses: webfactory/ssh-agent@a6f90b1f127823b31d4d4a8d96047790581349bd # v0.9.1
2222
with:
2323
ssh-private-key: ${{ secrets.GITLAB_SSH_KEY }}
2424

2525
- name: Mirror to GitLab
2626
run: |
2727
ssh-keyscan -t ed25519 gitlab.com >> ~/.ssh/known_hosts
28-
git remote add gitlab git@gitlab.com:hyperpolymath/${{ github.event.repository.name }}.git || true
28+
git remote add gitlab git@gitlab.com:${{ vars.GITLAB_ORG || vars.MIRROR_ORG || github.repository_owner }}/${{ github.event.repository.name }}.git || true
2929
git push --force gitlab main
3030
3131
mirror-bitbucket:
3232
runs-on: ubuntu-latest
3333
if: vars.BITBUCKET_MIRROR_ENABLED == 'true'
3434
steps:
35-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
35+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3636
with:
3737
fetch-depth: 0
3838

39-
- uses: webfactory/ssh-agent@dc588b651fe13675774614f8e6a936a468676387 # v0.9.0
39+
- uses: webfactory/ssh-agent@a6f90b1f127823b31d4d4a8d96047790581349bd # v0.9.1
4040
with:
4141
ssh-private-key: ${{ secrets.BITBUCKET_SSH_KEY }}
4242

4343
- name: Mirror to Bitbucket
4444
run: |
4545
ssh-keyscan -t ed25519 bitbucket.org >> ~/.ssh/known_hosts
46-
git remote add bitbucket git@bitbucket.org:hyperpolymath/${{ github.event.repository.name }}.git || true
46+
git remote add bitbucket git@bitbucket.org:${{ vars.BITBUCKET_ORG || vars.MIRROR_ORG || github.repository_owner }}/${{ github.event.repository.name }}.git || true
4747
git push --force bitbucket main
4848
4949
mirror-codeberg:
5050
runs-on: ubuntu-latest
5151
if: vars.CODEBERG_MIRROR_ENABLED == 'true'
5252
steps:
53-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
53+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5454
with:
5555
fetch-depth: 0
5656

57-
- uses: webfactory/ssh-agent@dc588b651fe13675774614f8e6a936a468676387 # v0.9.0
57+
- uses: webfactory/ssh-agent@a6f90b1f127823b31d4d4a8d96047790581349bd # v0.9.1
5858
with:
5959
ssh-private-key: ${{ secrets.CODEBERG_SSH_KEY }}
6060

6161
- name: Mirror to Codeberg
6262
run: |
6363
ssh-keyscan -t ed25519 codeberg.org >> ~/.ssh/known_hosts
64-
git remote add codeberg git@codeberg.org:hyperpolymath/${{ github.event.repository.name }}.git || true
64+
git remote add codeberg git@codeberg.org:${{ vars.CODEBERG_ORG || vars.MIRROR_ORG || github.repository_owner }}/${{ github.event.repository.name }}.git || true
6565
git push --force codeberg main
6666
6767
mirror-sourcehut:
6868
runs-on: ubuntu-latest
6969
if: vars.SOURCEHUT_MIRROR_ENABLED == 'true'
7070
steps:
71-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
71+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
7272
with:
7373
fetch-depth: 0
7474

75-
- uses: webfactory/ssh-agent@dc588b651fe13675774614f8e6a936a468676387 # v0.9.0
75+
- uses: webfactory/ssh-agent@a6f90b1f127823b31d4d4a8d96047790581349bd # v0.9.1
7676
with:
7777
ssh-private-key: ${{ secrets.SOURCEHUT_SSH_KEY }}
7878

7979
- name: Mirror to SourceHut
8080
run: |
8181
ssh-keyscan -t ed25519 git.sr.ht >> ~/.ssh/known_hosts
82-
git remote add sourcehut git@git.sr.ht:~hyperpolymath/${{ github.event.repository.name }} || true
82+
git remote add sourcehut git@git.sr.ht:~${{ vars.SOURCEHUT_ORG || vars.MIRROR_ORG || github.repository_owner }}/${{ github.event.repository.name }} || true
8383
git push --force sourcehut main
8484
8585
mirror-disroot:
8686
runs-on: ubuntu-latest
8787
if: vars.DISROOT_MIRROR_ENABLED == 'true'
8888
steps:
89-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
89+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
9090
with:
9191
fetch-depth: 0
9292

93-
- uses: webfactory/ssh-agent@dc588b651fe13675774614f8e6a936a468676387 # v0.9.0
93+
- uses: webfactory/ssh-agent@a6f90b1f127823b31d4d4a8d96047790581349bd # v0.9.1
9494
with:
9595
ssh-private-key: ${{ secrets.DISROOT_SSH_KEY }}
9696

9797
- name: Mirror to Disroot
9898
run: |
9999
ssh-keyscan -t ed25519 git.disroot.org >> ~/.ssh/known_hosts
100-
git remote add disroot git@git.disroot.org:hyperpolymath/${{ github.event.repository.name }}.git || true
100+
git remote add disroot git@git.disroot.org:${{ vars.DISROOT_ORG || vars.MIRROR_ORG || github.repository_owner }}/${{ github.event.repository.name }}.git || true
101101
git push --force disroot main
102102
103103
mirror-gitea:
104104
runs-on: ubuntu-latest
105105
if: vars.GITEA_MIRROR_ENABLED == 'true'
106106
steps:
107-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
107+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
108108
with:
109109
fetch-depth: 0
110110

111-
- uses: webfactory/ssh-agent@dc588b651fe13675774614f8e6a936a468676387 # v0.9.0
111+
- uses: webfactory/ssh-agent@a6f90b1f127823b31d4d4a8d96047790581349bd # v0.9.1
112112
with:
113113
ssh-private-key: ${{ secrets.GITEA_SSH_KEY }}
114114

115115
- name: Mirror to Gitea
116116
run: |
117117
ssh-keyscan -t ed25519 ${{ vars.GITEA_HOST }} >> ~/.ssh/known_hosts
118-
git remote add gitea git@${{ vars.GITEA_HOST }}:hyperpolymath/${{ github.event.repository.name }}.git || true
118+
git remote add gitea git@${{ vars.GITEA_HOST }}:${{ vars.GITEA_ORG || vars.MIRROR_ORG || github.repository_owner }}/${{ github.event.repository.name }}.git || true
119119
git push --force gitea main
120120
121121
mirror-radicle:
122122
runs-on: ubuntu-latest
123123
if: vars.RADICLE_MIRROR_ENABLED == 'true'
124124
steps:
125-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
125+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
126126
with:
127127
fetch-depth: 0
128128

129+
- name: Setup Rust
130+
uses: dtolnay/rust-toolchain@efa25f7f19611383d5b0ccf2d1c8914531636bf9 # stable
131+
with:
132+
toolchain: stable
133+
129134
- name: Install Radicle
130135
run: |
131-
curl -sSf https://radicle.xyz/install | sh
132-
echo "$HOME/.radicle/bin" >> $GITHUB_PATH
136+
# Install via cargo (safer than curl|sh)
137+
cargo install radicle-cli --locked
138+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
133139
134140
- name: Mirror to Radicle
135141
run: |

0 commit comments

Comments
 (0)