Skip to content

Commit

Permalink
simpler workflow caching for Maven
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-kuba committed Dec 23, 2022
1 parent 5d9dc65 commit eba5c31
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/release_assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,7 @@ jobs:
with:
distribution: 'zulu'
java-version: 17

- name: "restore cached maven repository"
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
cache: 'maven'

- name: "compile and package"
run: mvn -B clean package
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,7 @@ jobs:
with:
distribution: 'zulu'
java-version: ${{ matrix.java }}

- name: "restore cached maven repository"
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-jdk${{ matrix.java }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-jdk${{ matrix.java }}-
cache: 'maven'

- name: "build and test with Maven"
run: mvn -B clean test
Expand Down

0 comments on commit eba5c31

Please sign in to comment.