From c599e37d4a9d35ce6cb25b0a6d442bae0d47ceaf Mon Sep 17 00:00:00 2001 From: civisrom <167646351+civisrom@users.noreply.github.com> Date: Sat, 8 Mar 2025 19:35:45 +0300 Subject: [PATCH] Create auto-merge-dependabot.yml --- .github/workflows/auto-merge-dependabot.yml | 36 +++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/auto-merge-dependabot.yml diff --git a/.github/workflows/auto-merge-dependabot.yml b/.github/workflows/auto-merge-dependabot.yml new file mode 100644 index 00000000..dc18661b --- /dev/null +++ b/.github/workflows/auto-merge-dependabot.yml @@ -0,0 +1,36 @@ +name: Auto-merge Dependabot PRs + +on: + pull_request_target: + branches: + - main + +jobs: + auto-merge: + runs-on: ubuntu-latest + if: github.actor == 'dependabot[bot]' + permissions: + pull-requests: write + contents: write + steps: + - name: Auto-approve Dependabot PRs + uses: hmarr/auto-approve-action@v3 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Wait for tests to succeed + uses: lewagon/wait-on-check-action@v1.3.1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + check-name: 'test' # Имя джоба из вашего test.yml + wait-interval: 20 + ref: ${{ github.event.pull_request.head.sha }} + + - name: Auto-merge Dependabot PRs + if: success() + uses: pascalgn/automerge-action@v0.15.6 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + MERGE_METHOD: "squash" + MERGE_LABELS: "dependencies" + MERGE_COMMIT_MESSAGE: "pull-request-title"