From a07f8d42232c5e7caac7c15bc26069040a5ba26a Mon Sep 17 00:00:00 2001 From: Heiko Seeberger Date: Wed, 27 Dec 2023 08:25:52 +0100 Subject: [PATCH] build: automatically merge dependabot PRs --- .../workflows/auto-merge-dependabot-pr.yaml | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/auto-merge-dependabot-pr.yaml diff --git a/.github/workflows/auto-merge-dependabot-pr.yaml b/.github/workflows/auto-merge-dependabot-pr.yaml new file mode 100644 index 0000000..9f64837 --- /dev/null +++ b/.github/workflows/auto-merge-dependabot-pr.yaml @@ -0,0 +1,26 @@ +name: auto-merge-dependabot-pr + +on: + pull_request: + branches: + - main + +permissions: + contents: write + pull-requests: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: github.actor == 'dependabot[bot]' + steps: + - name: approve + run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: merge + run: gh pr merge --auto --squash "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}