mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-05-10 10:21:51 +00:00
33 lines
958 B
YAML
33 lines
958 B
YAML
name: Dependabot Auto-merge
|
|
|
|
on:
|
|
pull_request_target:
|
|
types: [opened, synchronize, reopened]
|
|
|
|
jobs:
|
|
auto-merge:
|
|
runs-on: ubuntu-latest
|
|
# Только для PR от Dependabot
|
|
if: github.actor == 'dependabot[bot]'
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Wait for tests to succeed
|
|
uses: lewagon/wait-on-check-action@v1.3.4
|
|
with:
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
check-name: 'test' # Имя job из вашего test.yml
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
wait-interval: 20
|
|
allowed-conclusions: success
|
|
|
|
- name: Enable auto-merge
|
|
if: success()
|
|
run: gh pr merge --auto --squash "$PR_URL"
|
|
env:
|
|
PR_URL: ${{ github.event.pull_request.html_url }}
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|