Split auto-merge into separate workflow

This commit is contained in:
William Brawner 2024-03-27 16:51:29 -06:00
parent 94a373f779
commit 2b66ea916b
2 changed files with 18 additions and 15 deletions

18
.github/workflows/auto-merge.yml vendored Normal file
View file

@ -0,0 +1,18 @@
name: Enable Auto Merge
on: pull_request
permissions:
contents: write
pull-requests: write
jobs:
auto-merge:
runs-on: ubuntu-latest
if: ${{ github.actor == 'wbrawner' || github.actor == 'dependabot[bot]' }}
steps:
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --rebase "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GH_TOKEN}}

View file

@ -1,11 +1,6 @@
name: Pull request workflow name: Pull request workflow
on: pull_request on: pull_request
permissions:
contents: write
pull-requests: write
checks: write
jobs: jobs:
test: test:
name: Build and Test name: Build and Test
@ -30,13 +25,3 @@ jobs:
path: "*/build/test-results/test/*.xml" path: "*/build/test-results/test/*.xml"
reporter: java-junit reporter: java-junit
fail-on-error: true fail-on-error: true
automerge:
name: Enable automerge
runs-on: ubuntu-latest
if: ${{ github.actor == 'wbrawner' || github.actor == 'dependabot[bot]' }}
steps:
- name: Enable auto-merge
run: gh pr merge --auto --rebase "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GH_TOKEN}}