diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml new file mode 100644 index 00000000..511d1226 --- /dev/null +++ b/.github/workflows/automerge.yml @@ -0,0 +1,26 @@ +name: Auto Merge Dependabot PRs + +on: + pull_request_target: + types: + - opened + - synchronize + - reopened + workflow_dispatch: + +permissions: + contents: write # Required for merging the PR + pull-requests: write # Required for managing pull requests + +jobs: + automerge: + if: github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Enable Auto-Merge for Dependabot PR + run: gh pr merge ${{ github.event.pull_request.number }} --auto --squash + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}