Skip to content

Commit

Permalink
CI: cache ~/.m2/repository correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrueden committed Jun 14, 2022
1 parent 2efc54f commit 57769d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 30 deletions.
18 changes: 3 additions & 15 deletions .github/workflows/build-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,12 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Cache m2 folder
uses: actions/cache@v2
env:
cache-name: cache-m2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-build-${{ env.cache-name }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Set up JDK 8
uses: actions/setup-java@v2
- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'zulu'
cache: 'maven'
- name: Set up CI environment
run: .github/setup.sh
- name: Execute the build
Expand Down
18 changes: 3 additions & 15 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,12 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Cache m2 folder
uses: actions/cache@v2
env:
cache-name: cache-m2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-build-${{ env.cache-name }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Set up JDK 8
uses: actions/setup-java@v2
- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'zulu'
cache: 'maven'
- name: Set up CI environment
run: .github/setup.sh
- name: Execute the build
Expand Down

0 comments on commit 57769d8

Please sign in to comment.