Skip to content

Commit c582c54

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

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
@@ -30,12 +30,6 @@ jobs:
3030
with:
3131
path: /tmp/.buildx-cache
3232
key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }}
33-
- name: Cache Maven packages
34-
uses: actions/cache@v3
35-
with:
36-
path: ~/.m2
37-
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
38-
restore-keys: ${{ runner.os }}-m2
3933

4034
- name: Set up Docker Buildx
4135
id: buildx
@@ -45,6 +39,7 @@ jobs:
4539
with:
4640
distribution: 'zulu'
4741
java-version: '17'
42+
cache: 'maven'
4843

4944
- name: Create custom Maven Settings.xml
5045
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
@@ -25,12 +25,6 @@ jobs:
2525
with:
2626
path: /tmp/.buildx-cache
2727
key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }}
28-
- name: Cache Maven packages
29-
uses: actions/cache@v3
30-
with:
31-
path: ~/.m2
32-
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
33-
restore-keys: ${{ runner.os }}-m2
3428

3529
- name: Extract tag name
3630
id: extract_tagname
@@ -43,6 +37,7 @@ jobs:
4337
with:
4438
distribution: 'zulu'
4539
java-version: '17'
40+
cache: 'maven'
4641
- name: Set up Docker Buildx
4742
id: buildx
4843
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
@@ -37,18 +37,13 @@ jobs:
3737
path: ~/.sonar/cache
3838
key: ${{ runner.os }}-sonar
3939
restore-keys: ${{ runner.os }}-sonar
40-
- name: Cache Maven packages
41-
uses: actions/cache@v3
42-
with:
43-
path: ~/.m2
44-
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
45-
restore-keys: ${{ runner.os }}-m2
4640

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

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

0 commit comments

Comments
 (0)