From ae42296bbad0868d0e9558389e2d38f2d627f911 Mon Sep 17 00:00:00 2001 From: Ben Welsh Date: Tue, 1 Oct 2024 04:52:52 -0400 Subject: [PATCH] Create dependabot-automerge.yaml --- .github/workflows/dependabot-automerge.yaml | 25 +++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/dependabot-automerge.yaml diff --git a/.github/workflows/dependabot-automerge.yaml b/.github/workflows/dependabot-automerge.yaml new file mode 100644 index 0000000..b5c201d --- /dev/null +++ b/.github/workflows/dependabot-automerge.yaml @@ -0,0 +1,25 @@ +name: Dependabot auto-merge +on: pull_request + +permissions: + contents: write + pull-requests: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'palewire/python-open-source-template' + steps: + - id: metadata + name: Dependabot metadata + uses: dependabot/fetch-metadata@4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + + - id: merge + name: Enable auto-merge for Dependabot PRs + if: steps.metadata.outputs.update-type == 'version-update:semver-patch' + run: gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}