Merge pull request #1702 from Owain94/ready-set-github-action
actions: More actions -- again...
This commit is contained in:
42
.github/workflows/build.yml
vendored
42
.github/workflows/build.yml
vendored
@@ -4,7 +4,7 @@ on: [pull_request, push]
|
||||
|
||||
jobs:
|
||||
pr-lint:
|
||||
name: Title linter
|
||||
name: PR title
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
@@ -16,17 +16,14 @@ jobs:
|
||||
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
matrix:
|
||||
java: [ 9, 11, 12 ]
|
||||
name: Build (Java ${{ matrix.java }})
|
||||
name: Build
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Set up JDK ${{ matrix.java }}
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@master
|
||||
with:
|
||||
java-version: ${{ matrix.java }}
|
||||
java-version: 11
|
||||
- name: Assembling
|
||||
run: gradlew assemble --console=plain
|
||||
- name: Building
|
||||
@@ -34,17 +31,14 @@ jobs:
|
||||
|
||||
test:
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
matrix:
|
||||
java: [ 9, 11, 12 ]
|
||||
name: Test (Java ${{ matrix.java }})
|
||||
name: Test
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@master
|
||||
with:
|
||||
java-version: ${{ matrix.java }}
|
||||
java-version: 11
|
||||
- name: Assembling
|
||||
run: gradlew assemble --console=plain
|
||||
- name: Testing
|
||||
@@ -74,5 +68,29 @@ jobs:
|
||||
- name: Approve pull request
|
||||
if: github.event_name == 'pull_request' && github.actor == 'OpenOSRS'
|
||||
uses: hmarr/auto-approve-action@master
|
||||
with:
|
||||
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
|
||||
merge:
|
||||
name: Merge
|
||||
needs: approve
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Merge pull request
|
||||
if: github.event_name == 'pull_request' && github.actor == 'OpenOSRS'
|
||||
uses: managedkaos/merge-pull-request@master
|
||||
with:
|
||||
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
|
||||
cleanup:
|
||||
name: Cleanup
|
||||
needs: merge
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Remove merged branch
|
||||
if: github.event_name == 'pull_request' && github.actor == 'OpenOSRS'
|
||||
uses: jessfraz/branch-cleanup-action@master
|
||||
with:
|
||||
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
Reference in New Issue
Block a user