-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (35 loc) · 954 Bytes
/
java-lint.yaml
File metadata and controls
42 lines (35 loc) · 954 Bytes
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
name: Fix Java Code Style
on:
workflow_call:
inputs:
java_version:
required: false
type: string
default: "24"
permissions:
contents: write
jobs:
java-format:
runs-on: ubuntu-latest
name: Java Spotless Autofix
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ inputs.java_version }}
- name: Cache Maven
uses: actions/cache@v5
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Run Spotless Apply
run: mvn spotless:apply
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "chore: fix java code style issues"