From 803f9f4b1317e10bb134c424861143fc79de4ba7 Mon Sep 17 00:00:00 2001 From: Luca Auer Date: Mon, 11 Dec 2023 11:11:23 +0100 Subject: [PATCH] Create dependabot-auto-merge.yml --- .github/workflows/dependabot-auto-merge.yml | 22 +++++++++++++++++++++ 1 file changed, 22 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 00000000..ccedec03 --- /dev/null +++ b/.github/workflows/dependabot-auto-merge.yml @@ -0,0 +1,22 @@ +name: Auto Merge Dependabot PRs + +on: + pull_request: + types: + - labeled + +jobs: + automerge: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Enable auto-merge for Dependabot PRs + if: github.actor == 'dependabot[bot]' && github.event.pull_request.labels.*.name == 'dependencies' + run: | + PR_NUMBER=$(echo ${{ github.event.pull_request.number }}) + echo "Enabling auto-merge for PR #$PR_NUMBER" + gh pr merge $PR_NUMBER --auto --squash + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}