Skip to content

Commit f799421

Browse files
committed
chore(305): use built-in Maven cache mechanism of setup-java GitHub
Action fixes #305 Signed-off-by: Aurélien Pupier <[email protected]>
1 parent 5993c78 commit f799421

File tree

3 files changed

+3
-18
lines changed

3 files changed

+3
-18
lines changed

.github/workflows/build-project.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@ jobs:
2828
with:
2929
path: /tmp/.buildx-cache
3030
key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }}
31-
- name: Cache Maven packages
32-
uses: actions/cache@v3
33-
with:
34-
path: ~/.m2
35-
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
36-
restore-keys: ${{ runner.os }}-m2
3731

3832
- name: Set up Docker Buildx
3933
id: buildx
@@ -43,6 +37,7 @@ jobs:
4337
with:
4438
distribution: 'zulu'
4539
java-version: '17'
40+
cache: 'maven'
4641

4742
- name: Create custom Maven Settings.xml
4843
uses: whelk-io/maven-settings-xml-action@v21

.github/workflows/release-project.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@ jobs:
2323
with:
2424
path: /tmp/.buildx-cache
2525
key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }}
26-
- name: Cache Maven packages
27-
uses: actions/cache@v3
28-
with:
29-
path: ~/.m2
30-
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
31-
restore-keys: ${{ runner.os }}-m2
3226

3327
- name: Extract tag name
3428
id: extract_tagname
@@ -41,6 +35,7 @@ jobs:
4135
with:
4236
distribution: 'zulu'
4337
java-version: '17'
38+
cache: 'maven'
4439
- name: Set up Docker Buildx
4540
id: buildx
4641
uses: docker/setup-buildx-action@v2

.github/workflows/sonarcloud-analysis.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,13 @@ jobs:
3636
path: ~/.sonar/cache
3737
key: ${{ runner.os }}-sonar
3838
restore-keys: ${{ runner.os }}-sonar
39-
- name: Cache Maven packages
40-
uses: actions/cache@v3
41-
with:
42-
path: ~/.m2
43-
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
44-
restore-keys: ${{ runner.os }}-m2
4539

4640
- name: Set up JDK 17
4741
uses: actions/setup-java@v3
4842
with:
4943
distribution: 'zulu'
5044
java-version: '17'
45+
cache: 'maven'
5146

5247
- name: Set Common Sonar Variables
5348
id: sonar_env

0 commit comments

Comments
 (0)