From d5aebe216a688b3b4e2923f0e79f0847c86dd2cb Mon Sep 17 00:00:00 2001 From: Demetrius Kanios Date: Mon, 14 Sep 2026 12:35:54 -0700 Subject: [PATCH] feat(ci): Add workflow to sync `pumpkin-plugin-wit` changes to mirror repo --- .github/workflows/sync-wit.yml | 41 ++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/sync-wit.yml diff --git a/.github/workflows/sync-wit.yml b/.github/workflows/sync-wit.yml new file mode 100644 index 000000000..91e70b83a --- /dev/null +++ b/.github/workflows/sync-wit.yml @@ -0,0 +1,41 @@ +name: Sync WIT to mirror repo + +on: + workflow_dispatch: + push: + branches: + - master + paths: + - ".github/workflows/sync-wit.yml" + - "crates/pumpkin-plugin-wit/**" + +concurrency: + group: sync-wit-to-mirror + cancel-in-progress: false + +jobs: + sync-wit: + runs-on: ubuntu-slim + steps: + - name: Checkout main repo + uses: actions/checkout@v7 + with: + fetch-depth: 0 + ref: master + persist-credentials: false + + - name: Create bot app token + id: app-token + uses: actions/create-github-app-token@v3 + with: + client-id: ${{ vars.BOT_APP_CLIENT_ID }} + private-key: ${{ secrets.BOT_APP_PRIVATE_KEY }} + owner: Pumpkin-MC + repositories: pumpkin-plugin-wit + + - name: Push changes to mirror + run: | + git subtree push \ + --prefix=crates/pumpkin-plugin-wit \ + https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/Pumpkin-MC/pumpkin-plugin-wit.git \ + master