diff --git a/.github/workflows/dependabot-automerge.yml b/.github/workflows/dependabot-automerge.yml new file mode 100644 index 0000000..e9cb224 --- /dev/null +++ b/.github/workflows/dependabot-automerge.yml @@ -0,0 +1,26 @@ +name: "Dependabot Automerge" + +on: + pull_request: + +permissions: + pull-requests: write + contents: write + +jobs: + worker: + runs-on: ubuntu-latest + + if: github.actor == 'dependabot[bot]' + steps: + - name: Approve PR + run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GH_TOKEN: ${{github.token}} + + - name: Enable auto-merge + run: gh pr merge --auto --squash "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GH_TOKEN: ${{github.token}}