From 9c3fbe7ad2585f4f90aef8714cae6191b4af67c6 Mon Sep 17 00:00:00 2001 From: Duane Goodner Date: Wed, 20 May 2026 13:10:10 -0600 Subject: [PATCH] add GitLab mirror workflow --- .github/workflows/mirror-to-gitlab.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/mirror-to-gitlab.yml diff --git a/.github/workflows/mirror-to-gitlab.yml b/.github/workflows/mirror-to-gitlab.yml new file mode 100644 index 0000000..b1c5ebc --- /dev/null +++ b/.github/workflows/mirror-to-gitlab.yml @@ -0,0 +1,23 @@ +name: Mirror to GitLab +on: + push: + branches: [main] +jobs: + mirror: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Push to GitLab + run: | + if [ "${{ github.repository_owner }}" = "duanegoodner" ]; then + GITLAB_NS="duane.goodner" + else + GITLAB_NS="${{ github.repository_owner }}" + fi + REPO_NAME="${{ github.event.repository.name }}" + git push --force \ + "https://oauth2:${GITLAB_TOKEN}@gitlab.com/${GITLAB_NS}/${REPO_NAME}.git" main + env: + GITLAB_TOKEN: ${{ secrets.GITLAB_MIRROR_TOKEN }}