Update auto-merge-dependabot.yml

This commit is contained in:
civisrom 2025-03-08 19:47:52 +03:00 committed by GitHub
parent 4fe744124d
commit 7886c34368
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,36 +1,33 @@
name: Auto-merge Dependabot PRs name: Dependabot Auto-merge
on: on:
pull_request_target: pull_request_target:
branches: types: [opened, synchronize, reopened]
- main
jobs: jobs:
auto-merge: auto-merge:
runs-on: ubuntu-latest runs-on: ubuntu-latest
# Только для PR от Dependabot
if: github.actor == 'dependabot[bot]' if: github.actor == 'dependabot[bot]'
permissions: permissions:
pull-requests: write
contents: write contents: write
pull-requests: write
steps: steps:
- name: Auto-approve Dependabot PRs - name: Checkout repository
uses: hmarr/auto-approve-action@v4 uses: actions/checkout@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Wait for tests to succeed - name: Wait for tests to succeed
uses: lewagon/wait-on-check-action@v1.3.4 uses: lewagon/wait-on-check-action@v1.3.4
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
check-name: 'test' # Имя джоба из вашего test.yml check-name: 'test' # Имя job из вашего test.yml
wait-interval: 20
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ github.event.pull_request.head.sha }}
wait-interval: 20
- name: Auto-merge Dependabot PRs allowed-conclusions: success
- name: Enable auto-merge
if: success() if: success()
uses: pascalgn/automerge-action@v0.16.4 run: gh pr merge --auto --squash "$PR_URL"
env: env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MERGE_METHOD: "squash"
MERGE_LABELS: "dependencies"
MERGE_COMMIT_MESSAGE: "pull-request-title"