diff --git a/.github/workflows/sync-branches.yml b/.github/workflows/sync-branches.yml new file mode 100644 index 0000000..b67b67e --- /dev/null +++ b/.github/workflows/sync-branches.yml @@ -0,0 +1,29 @@ +name: Sync dev to main +on: + push: + branches: + - dev + - develop + workflow_dispatch: + +permissions: + contents: write + +jobs: + sync: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v5 + - name: Get PAT for app + uses: actions/create-github-app-token@v2 + id: app-token + with: + app-id: ${{ secrets.APP_ID }} + private-key: ${{ secrets.APP_SECRET }} + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ steps.app-token.outputs.token }} + branch: main + force: true