From b0a501d931d34760f4b6d61c6d6c1a81984fa623 Mon Sep 17 00:00:00 2001 From: hyperpolymath <6759885+hyperpolymath@users.noreply.github.com> Date: Tue, 26 May 2026 16:51:57 +0100 Subject: [PATCH] chore(ci): replace mirror.yml with reusable wrapper 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._MIRROR_ENABLED. Part of estate-wide convergence campaign 2026-05-26 (standards#199 / #187). --- .github/workflows/mirror.yml | 68 +++--------------------------------- 1 file changed, 5 insertions(+), 63 deletions(-) diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml index 8986b6b..4279934 100644 --- a/.github/workflows/mirror.yml +++ b/.github/workflows/mirror.yml @@ -1,73 +1,15 @@ # SPDX-License-Identifier: PMPL-1.0 -name: Mirror to GitLab and Bitbucket +name: Mirror to Git Forges on: push: - branches: [main, master] - tags: - - 'v*' + branches: [main] workflow_dispatch: permissions: contents: read jobs: - mirror-gitlab: - runs-on: ubuntu-latest - permissions: - contents: read - if: ${{ vars.GITLAB_MIRROR_ENABLED == 'true' }} - - steps: - - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.1 - with: - fetch-depth: 0 - - - name: Setup SSH - uses: webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555 # v0.10.0 - with: - ssh-private-key: ${{ secrets.GITLAB_SSH_KEY }} - - - name: Add GitLab to known hosts - run: | - mkdir -p ~/.ssh - ssh-keyscan -t ed25519 gitlab.com >> ~/.ssh/known_hosts - - - name: Push to GitLab - env: - REPO_NAME: ${{ github.event.repository.name }} - run: | - git remote add gitlab git@gitlab.com:hyperpolymath/${REPO_NAME}.git || true - git push gitlab HEAD:main --force || git push gitlab HEAD:master --force - git push gitlab --tags --force - - mirror-bitbucket: - runs-on: ubuntu-latest - permissions: - contents: read - if: ${{ vars.BITBUCKET_MIRROR_ENABLED == 'true' }} - - steps: - - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.1 - with: - fetch-depth: 0 - - - name: Setup SSH - uses: webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555 # v0.10.0 - with: - ssh-private-key: ${{ secrets.BITBUCKET_SSH_KEY }} - - - name: Add Bitbucket to known hosts - run: | - mkdir -p ~/.ssh - ssh-keyscan -t ed25519 bitbucket.org >> ~/.ssh/known_hosts - - - name: Push to Bitbucket - env: - REPO_NAME: ${{ github.event.repository.name }} - run: | - git remote add bitbucket git@bitbucket.org:hyperpolymath/${REPO_NAME}.git || true - git push bitbucket HEAD:main --force || git push bitbucket HEAD:master --force - git push bitbucket --tags --force + mirror: + uses: hyperpolymath/standards/.github/workflows/mirror-reusable.yml@e6b2884722350515934d443daf23442f2195796f + secrets: inherit