Skip to content

Commit 20079b5

Browse files
chore(ci): replace mirror.yml with reusable wrapper (#54)
## 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 49ac7b1 commit 20079b5

1 file changed

Lines changed: 5 additions & 63 deletions

File tree

.github/workflows/mirror.yml

Lines changed: 5 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,15 @@
11
# SPDX-License-Identifier: PMPL-1.0-or-later
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

119
permissions:
1210
contents: read
1311

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