-
Notifications
You must be signed in to change notification settings - Fork 29
34 lines (34 loc) · 947 Bytes
/
check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: github-checks
on:
pull_request:
branches:
- develop
- 'feature/**'
jobs:
code-style:
name: code-style
runs-on: ubuntu-20.04
env:
working-directory: .github/workflows
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '8'
- id: files
uses: jitterbit/get-changed-files@v1
continue-on-error: true
- name: Check code style
id: stylecheck
run: |
for f in ${{ steps.files.outputs.added_modified }}; do
${{ env.working-directory }}/codestyle.sh ${f}
done
git diff | tee gitdiff
test ! -s gitdiff # is empty? yes: 0 no: 1
- name: Suggest code changes
if: ${{ failure() }}
uses: reviewdog/action-suggester@v1
with:
tool_name: code-style (indent, astyle, google-java-format)