doses/.github/workflows/auto_merge.yaml
2023-03-14 11:10:21 +01:00

30 lines
705 B
YAML

name: Test
on:
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
auto_merge:
name: Auto merge
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
env:
GH_TOKEN: ${{ github.token }}
if: >-
github.event.pull_request
&& github.event.pull_request.merged == false
&& (
github.event.pull_request.user.login == 'crocmagnon-pr[bot]'
|| github.event.pull_request.user.login == 'pre-commit-ci[bot]'
)
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Auto merge
run: gh pr merge ${{github.event.pull_request.number}} --delete-branch --rebase