Skip to content

Commit a7af448

Browse files
cpovirkGoogle Java Core Libraries
authored and
Google Java Core Libraries
committed
Use the Maven caching that is built into setup-java instead of using the separate cache action.
See: - google/guava#6035 - google/guava#6037 - https://github.com/actions/setup-java#caching-packages-dependencies I don't yet see support for Bazel, so I'm sticking with `actions/cache` for our Bazel projects. RELNOTES=n/a PiperOrigin-RevId: 746164516
1 parent 89ad19c commit a7af448

File tree

1 file changed

+3
-21
lines changed

1 file changed

+3
-21
lines changed

.github/workflows/ci.yml

+3-21
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,12 @@ jobs:
2323
access_token: ${{ github.token }}
2424
- name: 'Check out repository'
2525
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
26-
- name: 'Cache local Maven repository'
27-
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684
28-
with:
29-
path: ~/.m2/repository
30-
key: maven-${{ hashFiles('**/pom.xml') }}
31-
restore-keys: |
32-
maven-
3326
- name: 'Set up JDK ${{ matrix.java }}'
3427
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12
3528
with:
3629
java-version: ${{ matrix.java }}
3730
distribution: 'zulu'
31+
cache: 'maven'
3832
- name: 'Install'
3933
shell: bash
4034
run: mvn -B -P!standard-with-extra-repos install -U -DskipTests=true
@@ -53,18 +47,12 @@ jobs:
5347
steps:
5448
- name: 'Check out repository'
5549
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
56-
- name: 'Cache local Maven repository'
57-
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684
58-
with:
59-
path: ~/.m2/repository
60-
key: maven-${{ hashFiles('**/pom.xml') }}
61-
restore-keys: |
62-
maven-
6350
- name: 'Set up JDK 11'
6451
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12
6552
with:
6653
java-version: 11
6754
distribution: 'zulu'
55+
cache: 'maven'
6856
server-id: sonatype-nexus-snapshots
6957
server-username: CI_DEPLOY_USERNAME
7058
server-password: CI_DEPLOY_PASSWORD
@@ -82,18 +70,12 @@ jobs:
8270
steps:
8371
- name: 'Check out repository'
8472
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
85-
- name: 'Cache local Maven repository'
86-
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684
87-
with:
88-
path: ~/.m2/repository
89-
key: maven-${{ hashFiles('**/pom.xml') }}
90-
restore-keys: |
91-
maven-
9273
- name: 'Set up JDK 11'
9374
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12
9475
with:
9576
java-version: 11
9677
distribution: 'zulu'
78+
cache: 'maven'
9779
- name: 'Generate latest docs'
9880
env:
9981
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)