Skip to content

Commit

Permalink
use maven cache
Browse files Browse the repository at this point in the history
  • Loading branch information
sterlp authored Dec 17, 2023
1 parent 66c021b commit e1d9dc0
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: 11
distribution: "zulu"

- name: Cache Maven repository
uses: actions/cache@v3
with:
Expand All @@ -23,12 +29,6 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: 11
distribution: "zulu"

- name: Build with Maven
run: mvn -B install --file pom.xml

Expand Down Expand Up @@ -69,6 +69,14 @@ jobs:
java-version: 11
distribution: "zulu"

- name: Cache Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build and deploy maven registry
env:
GPG_KEYNAME: ${{ secrets.PGP_KEYNAME }}
Expand Down

0 comments on commit e1d9dc0

Please sign in to comment.