Repository navigation
chore(flake): update flake.lock #118
Workflow file for this run
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: Auto Merge | |
| on: | |
| pull_request: | |
| types: [opened, reopened, labeled, synchronize] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| # Auto-merge waits for the checks the main ruleset requires. It is enabled | |
| # with the App token because merges made with GITHUB_TOKEN do not trigger | |
| # workflows, so CI and release-please would not run on main. Where the App | |
| # token cannot be made, for example a Dependabot-triggered run in an org | |
| # without the Dependabot secret, it falls back to github.token and merges as | |
| # before. | |
| merge: | |
| if: contains(github.event.pull_request.labels.*.name, 'auto-merge') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Generate App token | |
| id: app-token | |
| continue-on-error: true | |
| uses: actions/create-github-app-token@v3 | |
| with: | |
| client-id: ${{ vars.APP_CLIENT_ID }} | |
| private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
| - name: Enable auto-merge | |
| env: | |
| GH_TOKEN: ${{ steps.app-token.outputs.token || github.token }} | |
| PR_URL: ${{ github.event.pull_request.html_url }} | |
| run: | | |
| gh pr review --approve "$PR_URL" || echo "PR approval skipped or failed." | |
| gh pr merge --auto --squash "$PR_URL" |