-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Don't store GitHub cache for Maven packages in PR builds
- Loading branch information
1 parent
a7ed350
commit 2333d21
Showing
3 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,10 +24,17 @@ jobs: | |
distribution: 'adopt' | ||
cache: maven | ||
- name: Cache Maven packages | ||
id: restore-maven-package-cache | ||
uses: actions/[email protected] | ||
with: | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2 | ||
- name: Build with Maven | ||
run: mvn -B verify | ||
- name: Save downloaded Maven packages | ||
uses: actions/cache/[email protected] | ||
with: | ||
path: ~/.m2 | ||
key: ${{ steps.restore-maven-package-cache.outputs.cache-primary-key }} | ||
if: github.event_name != 'pull_request' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,6 +74,7 @@ jobs: | |
if: matrix.os == 'ubuntu-latest' | ||
|
||
- name: Cache Maven packages | ||
id: restore-maven-package-cache | ||
uses: actions/[email protected] | ||
with: | ||
path: ~/.m2 | ||
|
@@ -103,6 +104,13 @@ jobs: | |
target/distributions/*.zip | ||
target/distributions/*.tar.gz | ||
- name: Save downloaded Maven packages | ||
uses: actions/cache/[email protected] | ||
with: | ||
path: ~/.m2 | ||
key: ${{ steps.restore-maven-package-cache.outputs.cache-primary-key }} | ||
if: github.event_name != 'pull_request' | ||
|
||
# Collect all executables and release | ||
release: | ||
needs: [ build ] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,13 @@ jobs: | |
# Disabling shallow clone is recommended for improving relevancy of reporting | ||
fetch-depth: 0 | ||
|
||
- name: Cache Maven packages | ||
uses: actions/[email protected] | ||
with: | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2 | ||
|
||
- name: Set up JDK | ||
uses: actions/[email protected] | ||
with: | ||
|