11# SPDX-License-Identifier: MPL-2.0
2- # SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell
32name : Mirror to Git Forges
43
54on :
@@ -11,142 +10,6 @@ permissions:
1110 contents : read
1211
1312jobs :
14- mirror-gitlab :
15- runs-on : ubuntu-latest
16- timeout-minutes : 15
17- if : vars.GITLAB_MIRROR_ENABLED == 'true'
18- steps :
19- - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
20- with :
21- fetch-depth : 0
22-
23- - uses : webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555 # v0.10.0
24- with :
25- ssh-private-key : ${{ secrets.GITLAB_SSH_KEY }}
26-
27- - name : Mirror to GitLab
28- run : |
29- ssh-keyscan -t ed25519 gitlab.com >> ~/.ssh/known_hosts
30- git remote add gitlab git@gitlab.com:${{ vars.GITLAB_ORG || vars.MIRROR_ORG || github.repository_owner }}/${{ github.event.repository.name }}.git || true
31- git push --force gitlab main
32-
33- mirror-bitbucket :
34- runs-on : ubuntu-latest
35- timeout-minutes : 15
36- if : vars.BITBUCKET_MIRROR_ENABLED == 'true'
37- steps :
38- - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
39- with :
40- fetch-depth : 0
41-
42- - uses : webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555 # v0.10.0
43- with :
44- ssh-private-key : ${{ secrets.BITBUCKET_SSH_KEY }}
45-
46- - name : Mirror to Bitbucket
47- run : |
48- ssh-keyscan -t ed25519 bitbucket.org >> ~/.ssh/known_hosts
49- git remote add bitbucket git@bitbucket.org:${{ vars.BITBUCKET_ORG || vars.MIRROR_ORG || github.repository_owner }}/${{ github.event.repository.name }}.git || true
50- git push --force bitbucket main
51-
52- mirror-codeberg :
53- runs-on : ubuntu-latest
54- timeout-minutes : 15
55- if : vars.CODEBERG_MIRROR_ENABLED == 'true'
56- steps :
57- - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
58- with :
59- fetch-depth : 0
60-
61- - uses : webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555 # v0.10.0
62- with :
63- ssh-private-key : ${{ secrets.CODEBERG_SSH_KEY }}
64-
65- - name : Mirror to Codeberg
66- run : |
67- ssh-keyscan -t ed25519 codeberg.org >> ~/.ssh/known_hosts
68- git remote add codeberg git@codeberg.org:${{ vars.CODEBERG_ORG || vars.MIRROR_ORG || github.repository_owner }}/${{ github.event.repository.name }}.git || true
69- git push --force codeberg main
70-
71- mirror-sourcehut :
72- runs-on : ubuntu-latest
73- timeout-minutes : 15
74- if : vars.SOURCEHUT_MIRROR_ENABLED == 'true'
75- steps :
76- - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
77- with :
78- fetch-depth : 0
79-
80- - uses : webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555 # v0.10.0
81- with :
82- ssh-private-key : ${{ secrets.SOURCEHUT_SSH_KEY }}
83-
84- - name : Mirror to SourceHut
85- run : |
86- ssh-keyscan -t ed25519 git.sr.ht >> ~/.ssh/known_hosts
87- git remote add sourcehut git@git.sr.ht:~${{ vars.SOURCEHUT_ORG || vars.MIRROR_ORG || github.repository_owner }}/${{ github.event.repository.name }} || true
88- git push --force sourcehut main
89-
90- mirror-disroot :
91- runs-on : ubuntu-latest
92- timeout-minutes : 15
93- if : vars.DISROOT_MIRROR_ENABLED == 'true'
94- steps :
95- - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
96- with :
97- fetch-depth : 0
98-
99- - uses : webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555 # v0.10.0
100- with :
101- ssh-private-key : ${{ secrets.DISROOT_SSH_KEY }}
102-
103- - name : Mirror to Disroot
104- run : |
105- ssh-keyscan -t ed25519 git.disroot.org >> ~/.ssh/known_hosts
106- git remote add disroot git@git.disroot.org:${{ vars.DISROOT_ORG || vars.MIRROR_ORG || github.repository_owner }}/${{ github.event.repository.name }}.git || true
107- git push --force disroot main
108-
109- mirror-gitea :
110- runs-on : ubuntu-latest
111- timeout-minutes : 15
112- if : vars.GITEA_MIRROR_ENABLED == 'true'
113- steps :
114- - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
115- with :
116- fetch-depth : 0
117-
118- - uses : webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555 # v0.10.0
119- with :
120- ssh-private-key : ${{ secrets.GITEA_SSH_KEY }}
121-
122- - name : Mirror to Gitea
123- run : |
124- ssh-keyscan -t ed25519 ${{ vars.GITEA_HOST }} >> ~/.ssh/known_hosts
125- git remote add gitea git@${{ vars.GITEA_HOST }}:${{ vars.GITEA_ORG || vars.MIRROR_ORG || github.repository_owner }}/${{ github.event.repository.name }}.git || true
126- git push --force gitea main
127-
128- mirror-radicle :
129- runs-on : ubuntu-latest
130- timeout-minutes : 15
131- if : vars.RADICLE_MIRROR_ENABLED == 'true'
132- steps :
133- - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
134- with :
135- fetch-depth : 0
136-
137- - name : Setup Rust
138- uses : dtolnay/rust-toolchain@efa25f7f19611383d5b0ccf2d1c8914531636bf9 # stable
139- with :
140- toolchain : stable
141-
142- - name : Install Radicle
143- run : |
144- # Install via cargo (safer than curl|sh)
145- cargo install radicle-cli --locked
146- echo "$HOME/.cargo/bin" >> $GITHUB_PATH
147-
148- - name : Mirror to Radicle
149- run : |
150- echo "${{ secrets.RADICLE_KEY }}" > ~/.radicle/keys/radicle
151- chmod 600 ~/.radicle/keys/radicle
152- rad sync --announce || echo "Radicle sync attempted"
13+ mirror :
14+ uses : hyperpolymath/standards/.github/workflows/mirror-reusable.yml@e6b2884722350515934d443daf23442f2195796f
15+ secrets : inherit
0 commit comments