Files
mc-onedark/.github/workflows/auto-merge.yml
2023-01-09 18:01:34 +02:00

29 lines
847 B
YAML

name: Auto-Merge Bot PRs
on: [pull_request]
jobs:
wait-for-checks:
if: ${{ (github.actor == 'dependabot[bot]') || (github.actor == 'pre-commit-ci[bot]') }}
runs-on: ubuntu-latest
steps:
- name: Wait for other checks to succeed
uses: lewagon/wait-on-check-action@v1.2.0
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
running-workflow-name: wait-for-checks
repo-token: ${{ secrets.GITHUB_TOKEN }}
auto-merge:
needs: [wait-for-checks]
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Enable auto-merge for Bot PRs
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}