Skip to content

Commit 5948600

Browse files
chore(ci): replace mirror.yml with reusable wrapper (#16)
## 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 63932b7 commit 5948600

1 file changed

Lines changed: 7 additions & 64 deletions

File tree

.github/workflows/mirror.yml

Lines changed: 7 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,15 @@
11
# SPDX-License-Identifier: MPL-2.0
2-
name: Mirror to GitLab and Bitbucket
2+
name: Mirror to Git Forges
33

44
on:
55
push:
6-
branches: [main, master]
7-
tags:
8-
- 'v*'
6+
branches: [main]
97
workflow_dispatch:
108

11-
permissions: read-all
9+
permissions:
10+
contents: read
1211

1312
jobs:
14-
mirror-gitlab:
15-
runs-on: ubuntu-latest
16-
permissions:
17-
contents: read
18-
if: ${{ vars.GITLAB_MIRROR_ENABLED == 'true' }}
19-
20-
steps:
21-
- name: Checkout
22-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
23-
with:
24-
fetch-depth: 0
25-
26-
- name: Setup SSH
27-
uses: webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555 # v0.10.0
28-
with:
29-
ssh-private-key: ${{ secrets.GITLAB_SSH_KEY }}
30-
31-
- name: Add GitLab to known hosts
32-
run: |
33-
mkdir -p ~/.ssh
34-
ssh-keyscan -t ed25519 gitlab.com >> ~/.ssh/known_hosts
35-
36-
- name: Push to GitLab
37-
env:
38-
REPO_NAME: ${{ github.event.repository.name }}
39-
run: |
40-
git remote add gitlab git@gitlab.com:hyperpolymath/${REPO_NAME}.git || true
41-
git push gitlab HEAD:main --force || git push gitlab HEAD:master --force
42-
git push gitlab --tags --force
43-
44-
mirror-bitbucket:
45-
runs-on: ubuntu-latest
46-
permissions:
47-
contents: read
48-
if: ${{ vars.BITBUCKET_MIRROR_ENABLED == 'true' }}
49-
50-
steps:
51-
- name: Checkout
52-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
53-
with:
54-
fetch-depth: 0
55-
56-
- name: Setup SSH
57-
uses: webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555 # v0.10.0
58-
with:
59-
ssh-private-key: ${{ secrets.BITBUCKET_SSH_KEY }}
60-
61-
- name: Add Bitbucket to known hosts
62-
run: |
63-
mkdir -p ~/.ssh
64-
ssh-keyscan -t ed25519 bitbucket.org >> ~/.ssh/known_hosts
65-
66-
- name: Push to Bitbucket
67-
env:
68-
REPO_NAME: ${{ github.event.repository.name }}
69-
run: |
70-
git remote add bitbucket git@bitbucket.org:hyperpolymath/${REPO_NAME}.git || true
71-
git push bitbucket HEAD:main --force || git push bitbucket HEAD:master --force
72-
git push bitbucket --tags --force
13+
mirror:
14+
uses: hyperpolymath/standards/.github/workflows/mirror-reusable.yml@e6b2884722350515934d443daf23442f2195796f
15+
secrets: inherit

0 commit comments

Comments
 (0)