Add pull request workflow for GitHub Actions
This commit is contained in:
parent
b6b88afdb2
commit
47d7e79d5d
1 changed files with 25 additions and 0 deletions
25
.github/workflows/pull-request.yml
vendored
Normal file
25
.github/workflows/pull-request.yml
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
name: Pull request workflow
|
||||
on: pull_request
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup Gradle
|
||||
uses: gradle/gradle-build-action@v2
|
||||
- name: Run checks with Gradle Wrapper
|
||||
run: ./gradlew check
|
||||
automerge:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.actor == 'wbrawner' }}
|
||||
steps:
|
||||
- name: Enable auto-merge
|
||||
run: gh pr merge --auto --merge "$PR_URL"
|
||||
env:
|
||||
PR_URL: ${{github.event.pull_request.html_url}}
|
||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
Loading…
Reference in a new issue