Skip to content

Commit ee4b2e9

Browse files
Merge pull request #306 from apupier/305-mavenCaching
chore(305): use built-in Maven cache mechanism of setup-java GitHub
2 parents 1d3b219 + 14a6dbf commit ee4b2e9

File tree

3 files changed

+3
-13
lines changed

3 files changed

+3
-13
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@v3

.github/workflows/sonarcloud-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ jobs:
5959
path: ~/.sonar/cache
6060
key: ${{ runner.os }}-sonar
6161
restore-keys: ${{ runner.os }}-sonar
62+
6263
- name: Cache Maven packages
6364
uses: actions/cache@v3
6465
with:
@@ -71,7 +72,6 @@ jobs:
7172
with:
7273
distribution: 'zulu'
7374
java-version: '17'
74-
7575
- name: Set Common Sonar Variables
7676
id: sonar_env
7777
run: |

0 commit comments

Comments
 (0)