Skip to content

Commit e950653

Browse files
chore(ci): replace mirror.yml with reusable wrapper (#74)
## 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 a9b7948 commit e950653

1 file changed

Lines changed: 3 additions & 133 deletions

File tree

.github/workflows/mirror.yml

Lines changed: 3 additions & 133 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# SPDX-License-Identifier: MPL-2.0
2-
# SPDX-FileCopyrightText: 2025 Jonathan D.A. Jewell
32
name: Mirror to Git Forges
43

54
on:
@@ -11,135 +10,6 @@ permissions:
1110
contents: read
1211

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