PlanOpticon
Add auto-merge workflow for Dependabot PRs
Commit
e2cda4c67a62fed88e955a1bb536f8765e65e758284e1be9ab95f5e1d448ead2
Parent
40e3d6b925433fb…
1 file changed
+25
| --- a/.github/workflows/dependabot-auto-merge.yml | ||
| +++ b/.github/workflows/dependabot-auto-merge.yml | ||
| @@ -0,0 +1,25 @@ | ||
| 1 | +name: Auto-merge Dependabot PRs | |
| 2 | + | |
| 3 | +on: | |
| 4 | + pull_request: | |
| 5 | + | |
| 6 | +permissions: | |
| 7 | + contents: write | |
| 8 | + pull-requests: write | |
| 9 | + | |
| 10 | +jobs: | |
| 11 | + auto-merge: | |
| 12 | + runs-on: ubuntu-latest | |
| 13 | + if: github.actor == 'dependabot[bot]' | |
| 14 | + steps: | |
| 15 | + - name: Approve PR | |
| 16 | + run: gh pr review --approve "$PR_URL" | |
| 17 | + env: | |
| 18 | + PR_URL: ${{ github.event.pull_request.html_url }} | |
| 19 | + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| 20 | + | |
| 21 | + - name: Enable auto-merge | |
| 22 | + run: gh pr merge --auto --squash "$PR_URL" | |
| 23 | + env: | |
| 24 | + PR_URL: ${{ github.event.pull_request.html_url }} | |
| 25 | + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| --- a/.github/workflows/dependabot-auto-merge.yml | |
| +++ b/.github/workflows/dependabot-auto-merge.yml | |
| @@ -0,0 +1,25 @@ | |
| --- a/.github/workflows/dependabot-auto-merge.yml | |
| +++ b/.github/workflows/dependabot-auto-merge.yml | |
| @@ -0,0 +1,25 @@ | |
| 1 | name: Auto-merge Dependabot PRs |
| 2 | |
| 3 | on: |
| 4 | pull_request: |
| 5 | |
| 6 | permissions: |
| 7 | contents: write |
| 8 | pull-requests: write |
| 9 | |
| 10 | jobs: |
| 11 | auto-merge: |
| 12 | runs-on: ubuntu-latest |
| 13 | if: github.actor == 'dependabot[bot]' |
| 14 | steps: |
| 15 | - name: Approve PR |
| 16 | run: gh pr review --approve "$PR_URL" |
| 17 | env: |
| 18 | PR_URL: ${{ github.event.pull_request.html_url }} |
| 19 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 20 | |
| 21 | - name: Enable auto-merge |
| 22 | run: gh pr merge --auto --squash "$PR_URL" |
| 23 | env: |
| 24 | PR_URL: ${{ github.event.pull_request.html_url }} |
| 25 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |