@@ -54,6 +54,9 @@ inputs:
5454 setup-java :
5555 description : Setup java based on env.JAVA_VERSION variable
5656 default : ' true'
57+ cache-key-prefix :
58+ description : Add a prefix to cache key
59+ default : ' '
5760runs :
5861 using : " composite"
5962 steps :
97100 !.m2/repository/io/helidon/**
98101 enableCrossOsArchive : true
99102 # only hash top-level poms to keep it fast
100- key : local-maven-${{ hashFiles('*/pom.xml', 'pom.xml') }}
103+ key : ${{ inputs.cache-key-prefix }} local-maven-${{ hashFiles('*/pom.xml', 'pom.xml') }}
101104 restore-keys : |
102- local-maven-
105+ ${{ inputs.cache-key-prefix }} local-maven-
103106 - name : Cache local Maven repository (read-only)
104107 if : ${{ inputs.maven-cache == 'read-only' }}
105108 uses :
actions/cache/[email protected] @@ -108,9 +111,9 @@ runs:
108111 .m2/repository/**/*.*
109112 !.m2/repository/io/helidon/**
110113 enableCrossOsArchive : true
111- key : local-maven-${{ hashFiles('*/pom.xml', 'pom.xml') }}
114+ key : ${{ inputs.cache-key-prefix }} local-maven-${{ hashFiles('*/pom.xml', 'pom.xml') }}
112115 restore-keys : |
113- local-maven-
116+ ${{ inputs.cache-key-prefix }} local-maven-
114117 - name : Build cache (read-write)
115118 if : ${{ inputs.build-cache == 'read-write' }}
116119@@ -119,7 +122,7 @@ runs:
119122 ./**/target/**
120123 .m2/repository/io/helidon/**
121124 enableCrossOsArchive : true
122- key : build-cache-${{ github.run_id }}-${{ github.run_attempt }}-${{ inputs.build-cache-id }}
125+ key : ${{ inputs.cache-key-prefix }} build-cache-${{ github.run_id }}-${{ github.run_attempt }}-${{ inputs.build-cache-id }}
123126 restore-keys : |
124127 build-cache-${{ github.run_id }}-${{ github.run_attempt }}-
125128 build-cache-${{ github.run_id }}-
@@ -132,10 +135,10 @@ runs:
132135 .m2/repository/io/helidon/**
133136 enableCrossOsArchive : true
134137 fail-on-cache-miss : true
135- key : build-cache-${{ github.run_id }}-${{ github.run_attempt }}-${{ inputs.build-cache-id }}
138+ key : ${{ inputs.cache-key-prefix }} build-cache-${{ github.run_id }}-${{ github.run_attempt }}-${{ inputs.build-cache-id }}
136139 restore-keys : |
137- build-cache-${{ github.run_id }}-${{ github.run_attempt }}-
138- build-cache-${{ github.run_id }}-
140+ ${{ inputs.cache-key-prefix }} build-cache-${{ github.run_id }}-${{ github.run_attempt }}-
141+ ${{ inputs.cache-key-prefix }} build-cache-${{ github.run_id }}-
139142 - name : Exec
140143 env :
141144 MVN_ARGS : |
0 commit comments