Skip to content

Commit 05e70cf

Browse files
chore(ci): replace mirror.yml with reusable wrapper (#7)
Pins to hyperpolymath/standards#187 merge SHA e6b2884722350515934d443daf23442f2195796f. Replaces the canonical mirror.yml (~145 lines, drift-prone) with a thin ~13-line wrapper. Forge selection still externalised to vars.<FORGE>_MIRROR_ENABLED. Part of estate-wide convergence campaign 2026-05-26 (standards#199 / #187).
1 parent 6fec93d commit 05e70cf

1 file changed

Lines changed: 6 additions & 33 deletions

File tree

.github/workflows/mirror.yml

Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +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:
66
branches: [main]
7+
workflow_dispatch:
78

8-
permissions: read-all
9+
permissions:
10+
contents: read
911

1012
jobs:
1113
mirror:
12-
name: Sync to Forges
13-
runs-on: ubuntu-latest
14-
if: vars.GITLAB_MIRROR_ENABLED == 'true' || vars.BITBUCKET_MIRROR_ENABLED == 'true'
15-
permissions:
16-
contents: read
17-
18-
steps:
19-
- name: Checkout repository
20-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
21-
with:
22-
fetch-depth: 0
23-
24-
- name: Mirror to GitLab
25-
if: vars.GITLAB_MIRROR_ENABLED == 'true' && secrets.GITLAB_SSH_KEY != ''
26-
run: |
27-
mkdir -p ~/.ssh
28-
echo "${{ secrets.GITLAB_SSH_KEY }}" > ~/.ssh/id_rsa
29-
chmod 600 ~/.ssh/id_rsa
30-
ssh-keyscan gitlab.com >> ~/.ssh/known_hosts
31-
git remote add gitlab git@gitlab.com:hyperpolymath/error-lang.git || true
32-
git push --mirror gitlab
33-
34-
- name: Mirror to Bitbucket
35-
if: vars.BITBUCKET_MIRROR_ENABLED == 'true' && secrets.BITBUCKET_SSH_KEY != ''
36-
run: |
37-
mkdir -p ~/.ssh
38-
echo "${{ secrets.BITBUCKET_SSH_KEY }}" > ~/.ssh/id_rsa
39-
chmod 600 ~/.ssh/id_rsa
40-
ssh-keyscan bitbucket.org >> ~/.ssh/known_hosts
41-
git remote add bitbucket git@bitbucket.org:hyperpolymath/error-lang.git || true
42-
git push --mirror bitbucket
14+
uses: hyperpolymath/standards/.github/workflows/mirror-reusable.yml@e6b2884722350515934d443daf23442f2195796f
15+
secrets: inherit

0 commit comments

Comments
 (0)