Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Commit c573509

Browse files
committed
Update cache settings
1 parent c187de6 commit c573509

File tree

4 files changed

+31
-9
lines changed

4 files changed

+31
-9
lines changed

.github/workflows/build-snapshot-worker.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ jobs:
3131
pack-version: 0.18.0
3232

3333
# cache maven .m2
34-
- uses: actions/cache@v1
34+
- uses: actions/cache@v2
3535
with:
36-
path: .m2
36+
path: ~/.m2/repository
3737
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
3838
restore-keys: |
3939
${{ runner.os }}-m2-
@@ -57,7 +57,7 @@ jobs:
5757
# build and publish to configured target
5858
- name: Build and Publish
5959
run: |
60-
jfrog rt mvn "-Dmaven.repo.local=.m2" -U -B clean install
60+
jfrog rt mvn -U -B clean install
6161
jfrog rt build-publish
6262
echo BUILD_ZOO_HANDLER_spring_cloud_dataflow_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) >> $GITHUB_ENV
6363
echo BUILD_ZOO_HANDLER_spring_cloud_dataflow_buildname=spring-cloud-dataflow-main >> $GITHUB_ENV
@@ -132,3 +132,7 @@ jobs:
132132
"event": "build-failed",
133133
"message": "spring-cloud-dataflow failed"
134134
}
135+
# clean m2 cache
136+
- name: Clean cache
137+
run: |
138+
find ~/.m2/repository -type d -name '*SNAPSHOT' | xargs rm -fr

.github/workflows/ci-pr.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v2
1111
# cache maven repo
12-
- uses: actions/cache@v1
12+
- uses: actions/cache@v2
1313
with:
14-
path: .m2
14+
path: ~/.m2/repository
1515
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
1616
restore-keys: |
1717
${{ runner.os }}-m2-
@@ -26,4 +26,8 @@ jobs:
2626
# build
2727
- name: Build
2828
run: |
29-
mvn "-Dmaven.repo.local=.m2" -U -B clean package
29+
mvn -U -B clean package
30+
# clean m2 cache
31+
- name: Clean cache
32+
run: |
33+
find ~/.m2/repository -type d -name '*SNAPSHOT' | xargs rm -fr

.github/workflows/ci.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
with:
1818
pack-version: 0.18.0
1919
# cache maven repo
20-
- uses: actions/cache@v1
20+
- uses: actions/cache@v2
2121
with:
22-
path: .m2
22+
path: ~/.m2/repository
2323
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
2424
restore-keys: |
2525
${{ runner.os }}-m2-
@@ -53,7 +53,7 @@ jobs:
5353
# build and publish
5454
- name: Build and Publish
5555
run: |
56-
jfrog rt mvn "-Dmaven.repo.local=.m2" -U -B clean install
56+
jfrog rt mvn -U -B clean install
5757
jfrog rt build-publish
5858
5959
# build images to local repo to get pushed
@@ -103,3 +103,7 @@ jobs:
103103
context: src/grafana/prometheus/docker/prometheus-local
104104
push: true
105105
tags: springcloud/spring-cloud-dataflow-prometheus-local:${{ env.spring_cloud_dataflow_version }}
106+
# clean m2 cache
107+
- name: Clean cache
108+
run: |
109+
find ~/.m2/repository -type d -name '*SNAPSHOT' | xargs rm -fr

.github/workflows/milestone-worker.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ jobs:
2828
uses: jvalkeal/[email protected]
2929
with:
3030
pack-version: 0.18.0
31+
- uses: actions/cache@v2
32+
with:
33+
path: ~/.m2/repository
34+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
35+
restore-keys: |
36+
${{ runner.os }}-m2-
3137
3238
# target deploy repos
3339
- name: Configure JFrog Cli
@@ -216,3 +222,7 @@ jobs:
216222
"event": "build-failed",
217223
"message": "spring-cloud-dataflow failed"
218224
}
225+
# clean m2 cache
226+
- name: Clean cache
227+
run: |
228+
find ~/.m2/repository -type d -name '*SNAPSHOT' | xargs rm -fr

0 commit comments

Comments
 (0)