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:
1111 contents : write
1212 pull-requests : write
1313
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
1416jobs :
1517 check-code :
1618 runs-on : ubuntu-latest
2325 with :
2426 java-version : ' 17'
2527 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-
2737
2838 - name : Build with Maven
2939 run : ./mvnw -B clean package -T2C
@@ -168,6 +178,15 @@ jobs:
168178 distribution : ' temurin'
169179 cache : ' maven'
170180
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+
171190 - name : Build site
172191 run : ../mvnw -B compile site -DskipTests -T2C
173192 working-directory : ${{ env.PRIMARY_MAVEN_MODULE }}
You can’t perform that action at this time.
0 commit comments