Skip to content

Commit 2bcc39d

Browse files
chore(ci): replace mirror.yml with reusable wrapper (#58)
## Summary Replaces this repo's full `mirror.yml` (~145 lines, drift-prone) with a thin ~13-line wrapper that calls `hyperpolymath/standards/.github/workflows/mirror-reusable.yml@e6b2884722350515934d443daf23442f2195796f` (merged via standards#187). Forge selection (GitLab, Bitbucket, Codeberg, SourceHut, Disroot, Gitea, Radicle) remains gated by Actions `vars.<FORGE>_MIRROR_ENABLED` exactly as before. `secrets: inherit` flows the per-forge SSH keys through implicitly. ## Why Estate audit: 289 `mirror.yml` deployments across the org, 75 unique blob SHAs (76% drift). Drift is action-SHA pin churn, not feature variance — the canonical 7-forge job set is identical across sampled variants. Converging behind the reusable cuts ~94k LOC of estate scaffold and means future changes to mirror logic propagate via one SHA bump. Part of estate-wide convergence campaign 2026-05-26 (standards#199 / #187).
1 parent 5c6b77f commit 2bcc39d

1 file changed

Lines changed: 3 additions & 137 deletions

File tree

.github/workflows/mirror.yml

Lines changed: 3 additions & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
<<<<<<< HEAD
21
# SPDX-License-Identifier: MPL-2.0
3-
=======
4-
# SPDX-License-Identifier: MPL-2.0-or-later
5-
>>>>>>> 1637fa5 (chore: sync from parent repo automation)
6-
# SPDX-FileCopyrightText: 2025 Jonathan D.A. Jewell
72
name: Mirror to Git Forges
83

94
on:
@@ -15,135 +10,6 @@ permissions:
1510
contents: read
1611

1712
jobs:
18-
mirror-gitlab:
19-
runs-on: ubuntu-latest
20-
if: vars.GITLAB_MIRROR_ENABLED == 'true'
21-
steps:
22-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
23-
with:
24-
fetch-depth: 0
25-
26-
- uses: webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555 # v0.10.0
27-
with:
28-
ssh-private-key: ${{ secrets.GITLAB_SSH_KEY }}
29-
30-
- name: Mirror to GitLab
31-
run: |
32-
ssh-keyscan -t ed25519 gitlab.com >> ~/.ssh/known_hosts
33-
git remote add gitlab git@gitlab.com:hyperpolymath/${{ github.event.repository.name }}.git || true
34-
git push --force gitlab main
35-
36-
mirror-bitbucket:
37-
runs-on: ubuntu-latest
38-
if: vars.BITBUCKET_MIRROR_ENABLED == 'true'
39-
steps:
40-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
41-
with:
42-
fetch-depth: 0
43-
44-
- uses: webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555 # v0.10.0
45-
with:
46-
ssh-private-key: ${{ secrets.BITBUCKET_SSH_KEY }}
47-
48-
- name: Mirror to Bitbucket
49-
run: |
50-
ssh-keyscan -t ed25519 bitbucket.org >> ~/.ssh/known_hosts
51-
git remote add bitbucket git@bitbucket.org:hyperpolymath/${{ github.event.repository.name }}.git || true
52-
git push --force bitbucket main
53-
54-
mirror-codeberg:
55-
runs-on: ubuntu-latest
56-
if: vars.CODEBERG_MIRROR_ENABLED == 'true'
57-
steps:
58-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
59-
with:
60-
fetch-depth: 0
61-
62-
- uses: webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555 # v0.10.0
63-
with:
64-
ssh-private-key: ${{ secrets.CODEBERG_SSH_KEY }}
65-
66-
- name: Mirror to Codeberg
67-
run: |
68-
ssh-keyscan -t ed25519 codeberg.org >> ~/.ssh/known_hosts
69-
git remote add codeberg git@codeberg.org:hyperpolymath/${{ github.event.repository.name }}.git || true
70-
git push --force codeberg main
71-
72-
mirror-sourcehut:
73-
runs-on: ubuntu-latest
74-
if: vars.SOURCEHUT_MIRROR_ENABLED == 'true'
75-
steps:
76-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
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:~hyperpolymath/${{ github.event.repository.name }} || true
88-
git push --force sourcehut main
89-
90-
mirror-disroot:
91-
runs-on: ubuntu-latest
92-
if: vars.DISROOT_MIRROR_ENABLED == 'true'
93-
steps:
94-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
95-
with:
96-
fetch-depth: 0
97-
98-
- uses: webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555 # v0.10.0
99-
with:
100-
ssh-private-key: ${{ secrets.DISROOT_SSH_KEY }}
101-
102-
- name: Mirror to Disroot
103-
run: |
104-
ssh-keyscan -t ed25519 git.disroot.org >> ~/.ssh/known_hosts
105-
git remote add disroot git@git.disroot.org:hyperpolymath/${{ github.event.repository.name }}.git || true
106-
git push --force disroot main
107-
108-
mirror-gitea:
109-
runs-on: ubuntu-latest
110-
if: vars.GITEA_MIRROR_ENABLED == 'true'
111-
steps:
112-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
113-
with:
114-
fetch-depth: 0
115-
116-
- uses: webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555 # v0.10.0
117-
with:
118-
ssh-private-key: ${{ secrets.GITEA_SSH_KEY }}
119-
120-
- name: Mirror to Gitea
121-
run: |
122-
ssh-keyscan -t ed25519 ${{ vars.GITEA_HOST }} >> ~/.ssh/known_hosts
123-
git remote add gitea git@${{ vars.GITEA_HOST }}:hyperpolymath/${{ github.event.repository.name }}.git || true
124-
git push --force gitea main
125-
126-
mirror-radicle:
127-
runs-on: ubuntu-latest
128-
if: vars.RADICLE_MIRROR_ENABLED == 'true'
129-
steps:
130-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
131-
with:
132-
fetch-depth: 0
133-
134-
- name: Setup Rust
135-
uses: dtolnay/rust-toolchain@efa25f7f19611383d5b0ccf2d1c8914531636bf9 # stable
136-
with:
137-
toolchain: stable
138-
139-
- name: Install Radicle
140-
run: |
141-
# Install via cargo (safer than curl|sh)
142-
cargo install radicle-cli --locked
143-
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
144-
145-
- name: Mirror to Radicle
146-
run: |
147-
echo "${{ secrets.RADICLE_KEY }}" > ~/.radicle/keys/radicle
148-
chmod 600 ~/.radicle/keys/radicle
149-
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

Comments
 (0)