Skip to content

Commit

Permalink
👌 IMPROVE: Cache maven repository in workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ianagbip1oti authored Jun 19, 2020
1 parent f876e16 commit 9671714
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,11 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java-version }}
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: maven-${{matrix.java-version}}-${{ hashFiles('pom.xml') }}
restore-keys: maven-${{ matrix.java-version}}-
- name: Verify
run: mvn -B verify
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: release-maven-${{ hashFiles('pom.xml') }}
restore-keys: release-maven-
- name: Release
env:
FILE_ENCRYPTION_PASSPHRASE: ${{ secrets.FILE_ENCRYPTION_PASSPHRASE }}
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: sonar-maven-${{ hashFiles('pom.xml') }}
restore-keys: sonar-maven-
- name: Run SonarCloud
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 9671714

Please sign in to comment.