actions: Fix
This commit is contained in:
43
.github/workflows/pr.yml
vendored
43
.github/workflows/pr.yml
vendored
@@ -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 }}
|
||||
Reference in New Issue
Block a user