actions: Fix

This commit is contained in:
Owain van Brakel
2019-11-02 06:27:44 +01:00
parent 529a10f786
commit c13511a6ba
3 changed files with 44 additions and 45 deletions

View File

@@ -1,11 +1,19 @@
name: OpenOSRS - CI (push)
name: OpenOSRS - CI (PR)
on:
push:
branches:
- master
on: pull_request
jobs:
pr-lint:
name: PR title
runs-on: ubuntu-latest
steps:
- name: PR title lint
if: github.event_name == 'pull_request'
uses: seferov/pr-lint-action@master
with:
title-regex: '^([\w-/]+): \w+'
build:
runs-on: ubuntu-latest
name: Build
@@ -55,4 +63,27 @@ jobs:
- name: Assembling
run: ./gradlew assemble --console=plain
- name: Checking code conventions
run: ./gradlew checkstyleMain --console=plain
run: ./gradlew checkstyleMain --console=plain
approve:
name: Approve
needs: [build, test, checkstyle]
runs-on: ubuntu-latest
steps:
- name: Approve pull request
if: github.event_name == 'pull_request' && github.actor == 'OpenOSRS'
uses: hmarr/auto-approve-action@v2.0.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
merge:
name: Merge
needs: approve
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: maxkomarychev/merge-pal-action@v0.1.0
with:
token: ${{ secrets.GITHUB_TOKEN }}