From 7b5766c72d8994f3a52c10714cad9090ed0ac77f Mon Sep 17 00:00:00 2001 From: civisrom <167646351+civisrom@users.noreply.github.com> Date: Sat, 8 Mar 2025 18:17:41 +0300 Subject: [PATCH] Create dependabot-auto-merge.yml --- .github/workflows/dependabot-auto-merge.yml | 27 +++++++++++++++++++++ 1 file changed, 27 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..28a5c725 --- /dev/null +++ b/.github/workflows/dependabot-auto-merge.yml @@ -0,0 +1,27 @@ +name: Auto-merge Dependabot PRs +on: + pull_request: + types: + - opened + - synchronize + - reopened + +permissions: + pull-requests: write + contents: write + +jobs: + auto-merge: + runs-on: ubuntu-latest + steps: + - name: Auto-approve Dependabot PRs + if: github.actor == 'dependabot[bot]' + run: gh pr review --approve "$GITHUB_REF" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Merge Dependabot PRs + if: github.actor == 'dependabot[bot]' + run: gh pr merge --auto --squash "$GITHUB_REF" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}