@@ -51,6 +51,12 @@ inputs:
5151 free-space :
5252 description : Whether to aggressively free disk space on the runner
5353 default : ' false'
54+ setup-latest-java :
55+ description : Setup latest stable java version
56+ default : ' false'
57+ cache-key-prefix :
58+ description : Add a prefix to cache key
59+ default : ' '
5460runs :
5561 using : " composite"
5662 steps :
@@ -87,10 +93,18 @@ runs:
8793 check-for-updates : ' false'
8894 set-java-home : ' false'
8995 - name : Set up JDK
96+ if : ${{ inputs.setup-latest-java == 'false' }}
90979198 with :
9299 distribution : ${{ env.JAVA_DISTRO }}
93100 java-version : ${{ env.JAVA_VERSION }}
101+ - name : Set up JDK ea-stable
102+ if : ${{ inputs.setup-latest-java == 'true' }}
103+ uses : oracle-actions/setup-java@v1
104+ with :
105+ website : jdk.java.net
106+ release : ea
107+ version : stable
94108 - name : Cache local Maven repository (read-write)
95109 if : ${{ inputs.maven-cache == 'read-write' }}
96110@@ -102,9 +116,9 @@ runs:
102116 !.m2/repository/io/helidon/**
103117 enableCrossOsArchive : true
104118 # only hash top-level poms to keep it fast
105- key : local-maven-${{ hashFiles('*/pom.xml', 'pom.xml') }}
119+ key : ${{ inputs.cache-key-prefix }} local-maven-${{ hashFiles('*/pom.xml', 'pom.xml') }}
106120 restore-keys : |
107- local-maven-
121+ ${{ inputs.cache-key-prefix }} local-maven-
108122 - name : Cache local Maven repository (read-only)
109123 if : ${{ inputs.maven-cache == 'read-only' }}
110124 uses :
actions/cache/[email protected] @@ -113,9 +127,9 @@ runs:
113127 .m2/repository/**/*.*
114128 !.m2/repository/io/helidon/**
115129 enableCrossOsArchive : true
116- key : local-maven-${{ hashFiles('*/pom.xml', 'pom.xml') }}
130+ key : ${{ inputs.cache-key-prefix }} local-maven-${{ hashFiles('*/pom.xml', 'pom.xml') }}
117131 restore-keys : |
118- local-maven-
132+ ${{ inputs.cache-key-prefix }} local-maven-
119133 - name : Build cache (read-write)
120134 if : ${{ inputs.build-cache == 'read-write' }}
121135@@ -124,7 +138,7 @@ runs:
124138 ./**/target/**
125139 .m2/repository/io/helidon/**
126140 enableCrossOsArchive : true
127- key : build-cache-${{ github.run_id }}-${{ github.run_attempt }}-${{ inputs.build-cache-id }}
141+ key : ${{ inputs.cache-key-prefix }} build-cache-${{ github.run_id }}-${{ github.run_attempt }}-${{ inputs.build-cache-id }}
128142 restore-keys : |
129143 build-cache-${{ github.run_id }}-${{ github.run_attempt }}-
130144 build-cache-${{ github.run_id }}-
@@ -137,10 +151,10 @@ runs:
137151 .m2/repository/io/helidon/**
138152 enableCrossOsArchive : true
139153 fail-on-cache-miss : true
140- key : build-cache-${{ github.run_id }}-${{ github.run_attempt }}-${{ inputs.build-cache-id }}
154+ key : ${{ inputs.cache-key-prefix }} build-cache-${{ github.run_id }}-${{ github.run_attempt }}-${{ inputs.build-cache-id }}
141155 restore-keys : |
142- build-cache-${{ github.run_id }}-${{ github.run_attempt }}-
143- build-cache-${{ github.run_id }}-
156+ ${{ inputs.cache-key-prefix }} build-cache-${{ github.run_id }}-${{ github.run_attempt }}-
157+ ${{ inputs.cache-key-prefix }} build-cache-${{ github.run_id }}-
144158 - name : Exec
145159 env :
146160 MVN_ARGS : |
@@ -159,7 +173,7 @@ runs:
159173 **/target/failsafe-reports/**
160174 **/target/it/**/*.log
161175 - name : Archive artifacts
162- if : ${{ inputs.artifact-name != '' && inputs.artifact-path != '' && always() }}
176+ if : ${{ inputs.artifact-name != '' && inputs.artifact-path != '' && always() }}
163177 uses : actions/upload-artifact@v4
164178 with :
165179 if-no-files-found : ' ignore'
0 commit comments