Skip to content

Commit

Permalink
#2 save maven caches on build failure
Browse files Browse the repository at this point in the history
  • Loading branch information
ewilkins-csi committed May 2, 2024
1 parent 6074971 commit 6793cdc
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
- name: Load m2 repository cache # Manually caching .m2 repo as the setup-java caching isn't falling back to older caches
id: cached-m2-repo
uses: actions/cache@v4
if: always()
with:
path: ~/.m2/repository
key: maven-${{ hashFiles('**/pom.xml') }}
Expand All @@ -50,7 +49,6 @@ jobs:
- name: Load m2 build cache
id: cached-m2-build
uses: actions/cache@v4
if: always()
with:
path: ~/.m2/build-cache
key: maven-build-cache-${{ hashFiles('**/pom.xml') }}
Expand Down Expand Up @@ -79,6 +77,23 @@ jobs:
./get_helm.sh
- name: Build aiSSEMBLE
run: ./mvnw -B clean install --file pom.xml -Dhabushu.usePyenv=false -Pci
#NB: The following two explicit cache saves are necessary to ensure caches are saved on build failure, until
# https://github.com/actions/cache/issues/1315 is resolved
- name: Save m2 repository cache
id: save-m2-repo
uses: actions/cache/save@v4
if: always()
with:
path: ~/.m2/repository
key: maven-${{ hashFiles('**/pom.xml') }}
- name: Save m2 build cache
id: save-m2-build
uses: actions/cache/save@v4
if: always()
with:
path: ~/.m2/build-cache
key: maven-build-cache-${{ hashFiles('**/pom.xml') }}


# # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
# - name: Update dependency graph
Expand Down

0 comments on commit 6793cdc

Please sign in to comment.