Skip to content

Commit 919d7d0

Browse files
authored
ci-build: cache local maven repo (#2437)
1 parent 6c1f268 commit 919d7d0

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

.github/workflows/maven-ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ jobs:
5454
distribution: 'temurin'
5555
cache: 'maven'
5656

57+
- name: Cache local Maven repository
58+
uses: actions/cache@v3
59+
with:
60+
path: ~/.m2/repository
61+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
62+
restore-keys: |
63+
${{ runner.os }}-maven-
64+
5765
# Cache Sonar packages which as used to run analysis and collect metrics
5866
- name: Cache SonarCloud packages
5967
uses: actions/cache@v3

.github/workflows/maven-pr-builder.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@ jobs:
5050
distribution: 'temurin'
5151
cache: 'maven'
5252

53+
- name: Cache local Maven repository
54+
uses: actions/cache@v3
55+
with:
56+
path: ~/.m2/repository
57+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
58+
restore-keys: |
59+
${{ runner.os }}-maven-
60+
5361
# Cache Sonar packages which as used to run analysis and collect metrics
5462
- name: Cache SonarCloud packages
5563
uses: actions/cache@v3

0 commit comments

Comments
 (0)