@@ -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 :
@@ -78,10 +84,18 @@ runs:
7884 check-for-updates : ' false'
7985 set-java-home : ' false'
8086 - name : Set up JDK
87+ if : ${{ inputs.setup-latest-java == 'false' }}
81888289 with :
8390 distribution : ${{ env.JAVA_DISTRO }}
8491 java-version : ${{ env.JAVA_VERSION }}
92+ - name : Set up JDK ea-stable
93+ if : ${{ inputs.setup-latest-java == 'true' }}
94+ uses : oracle-actions/setup-java@v1
95+ with :
96+ website : jdk.java.net
97+ release : ea
98+ version : stable
8599 - name : Cache local Maven repository (read-write)
86100 if : ${{ inputs.maven-cache == 'read-write' }}
8710193107 !.m2/repository/io/helidon/**
94108 enableCrossOsArchive : true
95109 # only hash top-level poms to keep it fast
96- key : local-maven-${{ hashFiles('*/pom.xml', 'pom.xml') }}
110+ key : ${{ inputs.cache-key-prefix }} local-maven-${{ hashFiles('*/pom.xml', 'pom.xml') }}
97111 restore-keys : |
98- local-maven-
112+ ${{ inputs.cache-key-prefix }} local-maven-
99113 - name : Cache local Maven repository (read-only)
100114 if : ${{ inputs.maven-cache == 'read-only' }}
101115 uses :
actions/cache/[email protected] @@ -104,9 +118,9 @@ runs:
104118 .m2/repository/**/*.*
105119 !.m2/repository/io/helidon/**
106120 enableCrossOsArchive : true
107- key : local-maven-${{ hashFiles('*/pom.xml', 'pom.xml') }}
121+ key : ${{ inputs.cache-key-prefix }} local-maven-${{ hashFiles('*/pom.xml', 'pom.xml') }}
108122 restore-keys : |
109- local-maven-
123+ ${{ inputs.cache-key-prefix }} local-maven-
110124 - name : Build cache (read-write)
111125 if : ${{ inputs.build-cache == 'read-write' }}
112126@@ -115,7 +129,7 @@ runs:
115129 ./**/target/**
116130 .m2/repository/io/helidon/**
117131 enableCrossOsArchive : true
118- key : build-cache-${{ github.run_id }}-${{ github.run_attempt }}-${{ inputs.build-cache-id }}
132+ key : ${{ inputs.cache-key-prefix }} build-cache-${{ github.run_id }}-${{ github.run_attempt }}-${{ inputs.build-cache-id }}
119133 restore-keys : |
120134 build-cache-${{ github.run_id }}-${{ github.run_attempt }}-
121135 build-cache-${{ github.run_id }}-
@@ -128,10 +142,10 @@ runs:
128142 .m2/repository/io/helidon/**
129143 enableCrossOsArchive : true
130144 fail-on-cache-miss : true
131- key : build-cache-${{ github.run_id }}-${{ github.run_attempt }}-${{ inputs.build-cache-id }}
145+ key : ${{ inputs.cache-key-prefix }} build-cache-${{ github.run_id }}-${{ github.run_attempt }}-${{ inputs.build-cache-id }}
132146 restore-keys : |
133- build-cache-${{ github.run_id }}-${{ github.run_attempt }}-
134- build-cache-${{ github.run_id }}-
147+ ${{ inputs.cache-key-prefix }} build-cache-${{ github.run_id }}-${{ github.run_attempt }}-
148+ ${{ inputs.cache-key-prefix }} build-cache-${{ github.run_id }}-
135149 - name : Exec
136150 env :
137151 MVN_ARGS : |
@@ -150,7 +164,7 @@ runs:
150164 **/target/failsafe-reports/**
151165 **/target/it/**/*.log
152166 - name : Archive artifacts
153- if : ${{ inputs.artifact-name != '' && inputs.artifact-path != '' && always() }}
167+ if : ${{ inputs.artifact-name != '' && inputs.artifact-path != '' && always() }}
154168 uses : actions/upload-artifact@v4
155169 with :
156170 if-no-files-found : ' ignore'
0 commit comments