File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ permissions:
11
11
contents : write
12
12
pull-requests : write
13
13
14
+ # DO NOT RESTORE CACHE for critical release steps to prevent a (extremely unlikely) scenario
15
+ # where a supply chain attack could be achieved due to poisoned cache
14
16
jobs :
15
17
check-code :
16
18
runs-on : ubuntu-latest
23
25
with :
24
26
java-version : ' 17'
25
27
distribution : ' temurin'
26
- cache : ' maven'
28
+
29
+ # Try to reuse existing cache from check-build
30
+ - name : Try restore Maven Cache
31
+ uses : actions/cache/restore@v4
32
+ with :
33
+ path : ~/.m2/repository
34
+ key : ${{ runner.os }}-mvn-build-${{ hashFiles('**/pom.xml') }}
35
+ restore-keys : |
36
+ ${{ runner.os }}-mvn-build-
27
37
28
38
- name : Build with Maven
29
39
run : ./mvnw -B clean package -T2C
@@ -168,6 +178,15 @@ jobs:
168
178
distribution : ' temurin'
169
179
cache : ' maven'
170
180
181
+ # Try to reuse existing cache from check-build
182
+ - name : Try restore Maven Cache
183
+ uses : actions/cache/restore@v4
184
+ with :
185
+ path : ~/.m2/repository
186
+ key : ${{ runner.os }}-mvn-build-${{ hashFiles('**/pom.xml') }}
187
+ restore-keys : |
188
+ ${{ runner.os }}-mvn-build-
189
+
171
190
- name : Build site
172
191
run : ../mvnw -B compile site -DskipTests -T2C
173
192
working-directory : ${{ env.PRIMARY_MAVEN_MODULE }}
You can’t perform that action at this time.
0 commit comments