From b76293aae9bf4f023af745c756ade4ebb2efe5f9 Mon Sep 17 00:00:00 2001 From: Allison Thackston Date: Sun, 5 Jan 2025 18:31:57 -0600 Subject: [PATCH] Add automerge workflow (#551) --- .github/workflows/automerge.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/automerge.yml 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 }}