Automerge Release PRs #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: Automerge Release PRs | |
| on: | |
| schedule: | |
| # Run every Monday at 6:00 AM UTC | |
| - cron: '0 6 * * 1' | |
| workflow_dispatch: # Allow manual triggering | |
| permissions: {} | |
| jobs: | |
| auto-merge: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Generate GitHub App Token | |
| id: app-token | |
| uses: actions/create-github-app-token@v2 | |
| with: | |
| app-id: ${{ secrets.RELEASES_APP_ID }} | |
| private-key: ${{ secrets.RELEASES_APP_PRIVATE_KEY }} | |
| - name: Enable auto-merge for release PRs | |
| run: | | |
| gh pr merge --auto --squash release-please--branches--main || true | |
| env: | |
| GH_TOKEN: ${{ steps.app-token.outputs.token }} | |
| GH_REPO: ${{ github.repository }} |