Skip to content

Commit 3fe3ba8

Browse files
committed
Use dedicated maven caches for pmd and checkstyle to avoid cache pollution
1 parent cad7e0c commit 3fe3ba8

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

.github/workflows/check-build.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,14 @@ jobs:
9797
with:
9898
distribution: ${{ matrix.distribution }}
9999
java-version: ${{ matrix.java }}
100-
cache: 'maven'
100+
101+
- name: Cache Maven
102+
uses: actions/cache@v4
103+
with:
104+
path: ~/.m2/repository
105+
key: ${{ runner.os }}-mvn-checkstyle-${{ hashFiles('**/pom.xml') }}
106+
restore-keys: |
107+
${{ runner.os }}-mvn-checkstyle-
101108
102109
- name: CheckStyle Cache
103110
uses: actions/cache@v4
@@ -128,7 +135,14 @@ jobs:
128135
with:
129136
distribution: ${{ matrix.distribution }}
130137
java-version: ${{ matrix.java }}
131-
cache: 'maven'
138+
139+
- name: Cache Maven
140+
uses: actions/cache@v4
141+
with:
142+
path: ~/.m2/repository
143+
key: ${{ runner.os }}-mvn-pmd-${{ hashFiles('**/pom.xml') }}
144+
restore-keys: |
145+
${{ runner.os }}-mvn-pmd-
132146
133147
- name: PMD Cache
134148
uses: actions/cache@v4

0 commit comments

Comments
 (0)