Skip to content

Commit f394c53

Browse files
chore(ci): replace mirror.yml with reusable wrapper (#159)
## 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 753de00 commit f394c53

1 file changed

Lines changed: 3 additions & 155 deletions

File tree

.github/workflows/mirror.yml

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

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