File tree Expand file tree Collapse file tree 2 files changed +31
-19
lines changed
Expand file tree Collapse file tree 2 files changed +31
-19
lines changed Original file line number Diff line number Diff line change 1+ name : ' Format Java Code'
2+ description : ' Runs mvn spotless:apply'
3+ inputs :
4+ path :
5+ description : ' Path to the java repository'
6+ required : true
7+ runs :
8+ using : ' composite'
9+ steps :
10+ - name : Set up JDK 11 for formatting
11+ uses : actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v4.2.1
12+ with :
13+ java-version : ' 11'
14+ distribution : ' temurin'
15+
16+ - name : Cache Maven packages
17+ uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.0.2
18+ with :
19+ path : ~/.m2
20+ key : ${{ runner.os }}-m2-${{ hashFiles(format('{0}/**/pom.xml', inputs.path)) }}
21+ restore-keys : |
22+ ${{ runner.os }}-m2-
23+
24+ - name : Run Spotless Apply
25+ run : mvn spotless:apply
26+ shell : bash
27+ working-directory : ${{ inputs.path }}
Original file line number Diff line number Diff line change 1- name : Java Code Format
1+ name : Format and Commit Java Code
22
33on :
44 workflow_dispatch :
5- push :
6- branches :
7- - ' sdk-automation/*'
85
96permissions :
107 contents : write
@@ -19,22 +16,10 @@ jobs:
1916 with :
2017 token : ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }}
2118
22- - name : Set up JDK
23- uses : actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165
19+ - name : Format Java Code
20+ uses : ./.github/ actions/format
2421 with :
25- java-version : ' 20'
26- distribution : ' adopt'
27-
28- - name : Cache Maven packages
29- uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
30- with :
31- path : ~/.m2
32- key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
33- restore-keys : |
34- ${{ runner.os }}-m2-
35-
36- - name : Run Spotless Apply
37- run : mvn spotless:apply
22+ path : .
3823
3924 - name : Commit and Push Changes
4025 env :
You can’t perform that action at this time.
0 commit comments