Create auto-merge-dependabot.yml

This commit is contained in:
civisrom 2025-03-08 19:35:45 +03:00 committed by GitHub
parent 82434f16db
commit c599e37d4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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"