Skip to content

Commit f2c2868

Browse files
[release/v1.28.x] Cache maven local (#489)
* Cache maven local * cache maven local at PR build time * Update caching steps * Only cache patch outputs
1 parent 844a3d1 commit f2c2868

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.github/workflows/main-build.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ jobs:
6060
with:
6161
java-version: 17
6262
distribution: temurin
63+
64+
# cache local patch outputs
65+
- name: Cache local Maven repository
66+
uses: actions/cache@v3
67+
with:
68+
path: |
69+
~/.m2/repository/io/opentelemetry/
70+
key: ${{ runner.os }}-maven-local-${{ hashFiles('.github/patches/**/opentelemetry-java-*.patch') }}
6371

6472
- name: Publish patched dependencies to maven local
6573
uses: ./.github/actions/patch-dependencies
@@ -308,6 +316,14 @@ jobs:
308316
java-version: 17
309317
distribution: temurin
310318

319+
# cache local patch outputs
320+
- name: Cache local Maven repository
321+
uses: actions/cache@v3
322+
with:
323+
path: |
324+
~/.m2/repository/io/opentelemetry/
325+
key: ${{ runner.os }}-maven-local-${{ hashFiles('.github/patches/**/opentelemetry-java-*.patch') }}
326+
311327
- uses: gradle/wrapper-validation-action@v1
312328

313329
- name: Configure AWS Credentials

.github/workflows/pr-build.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ jobs:
2525
with:
2626
node-version: 16
2727

28+
# cache local patch outputs
29+
- name: Cache local Maven repository
30+
uses: actions/cache@v3
31+
with:
32+
path: |
33+
~/.m2/repository/io/opentelemetry/
34+
key: ${{ runner.os }}-maven-local-${{ hashFiles('.github/patches/**/opentelemetry-java-*.patch') }}
35+
2836
# vaadin tests use pnpm
2937
- name: Cache pnpm modules
3038
uses: actions/cache@v3
@@ -65,6 +73,14 @@ jobs:
6573
java-version: 17
6674
distribution: temurin
6775

76+
# cache local patch outputs
77+
- name: Cache local Maven repository
78+
uses: actions/cache@v3
79+
with:
80+
path: |
81+
~/.m2/repository/io/opentelemetry/
82+
key: ${{ runner.os }}-maven-local-${{ hashFiles('.github/patches/**/opentelemetry-java-*.patch') }}
83+
6884
- uses: gradle/wrapper-validation-action@v1
6985

7086
- name: Publish patched dependencies to maven local

0 commit comments

Comments
 (0)