Skip to content

Commit 7c24e8d

Browse files
committed
[refactor] Separate the Caches used by different CI workflows
1 parent add32aa commit 7c24e8d

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

.github/workflows/ci-deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ jobs:
2424
uses: actions/cache@v3
2525
with:
2626
path: ~/.m2
27-
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
28-
restore-keys: ${{ runner.os }}-m2
27+
key: deploy-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
28+
restore-keys: deploy-${{ runner.os }}-maven
2929
- name: Install bats
3030
run: sudo apt-get install bats
3131
- name: Build images

.github/workflows/ci-xqts.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ jobs:
1414
with:
1515
distribution: temurin
1616
java-version: '17'
17-
cache: 'maven'
17+
- name: Cache Maven packages
18+
uses: actions/cache@v3
19+
with:
20+
path: ~/.m2
21+
key: xqts-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
22+
restore-keys: xqts-${{ runner.os }}-maven
1823
- name: Maven XQTS Build
1924
run: mvn -V -B clean package -DskipTests -Ddependency-check.skip=true --projects exist-xqts --also-make
2025
- name: Run XQTS

.github/workflows/sonarcloud.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ jobs:
2323
uses: actions/cache@v3
2424
with:
2525
path: ~/.sonar/cache
26-
key: ${{ runner.os }}-sonar
27-
restore-keys: ${{ runner.os }}-sonar
26+
key: sonarcloud-${{ runner.os }}-cache-${{ hashFiles('**/pom.xml') }}
27+
restore-keys: sonarcloud-${{ runner.os }}-cache
2828
- name: Cache Maven packages
2929
uses: actions/cache@v3
3030
with:
3131
path: ~/.m2
32-
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
33-
restore-keys: ${{ runner.os }}-m2
32+
key: sonarcloud-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
33+
restore-keys: sonarcloud-${{ runner.os }}-maven
3434
- name: Analyze
3535
env:
3636
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any

0 commit comments

Comments
 (0)