-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (41 loc) · 1.16 KB
/
format-java.yml
File metadata and controls
44 lines (41 loc) · 1.16 KB
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
35
36
37
38
39
40
41
42
43
44
name: Java Formatting
on:
push:
branches: ['main']
paths: ['src/main/java/**', 'src/test/**']
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
paths: ['**']
concurrency:
group: formatting-${{ github.ref }}
cancel-in-progress: true
jobs:
formatting:
name: Formatting
runs-on: ubuntu-latest
if: |
github.event_name != 'pull_request' ||
!contains(github.event.pull_request.labels.*.name, 'ci:skip')
permissions:
pull-requests: read
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check Path Filter
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
code:
- 'src/main/java/**'
- 'src/test/**'
- name: Setup Build
if: steps.filter.outputs.code == 'true'
uses: ./.github/actions/build_setup
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run Spotless Formatting Check
if: steps.filter.outputs.code == 'true'
run: ./gradlew spotlessCheck --warning-mode all