From 47d7e79d5d8dc16c3f685f323672f282820b792e Mon Sep 17 00:00:00 2001 From: William Brawner Date: Sun, 24 Sep 2023 20:03:08 -0600 Subject: [PATCH] Add pull request workflow for GitHub Actions --- .github/workflows/pull-request.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/pull-request.yml diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 0000000..0a83b42 --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -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}} \ No newline at end of file