From 091da50b21548135a5eac13892447ae672167568 Mon Sep 17 00:00:00 2001 From: Simon Marquis Date: Fri, 24 Nov 2023 20:38:01 +0000 Subject: [PATCH] Enable Dependabot auto-merge for minor/patch updates --- .github/workflows/dependabot-auto-merge.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/dependabot-auto-merge.yml diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml new file mode 100644 index 0000000..0bdb1c4 --- /dev/null +++ b/.github/workflows/dependabot-auto-merge.yml @@ -0,0 +1,19 @@ +name: 🤖 Dependabot auto-merge +on: pull_request + +permissions: + contents: write + pull-requests: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: github.actor == 'dependabot[bot]' + steps: + - id: metadata + uses: dependabot/fetch-metadata@v1 + - if: contains(fromJSON('["version-update:semver-minor", "version-update:semver-patch"]'), steps.metadata.outputs.update-type) + run: gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}