Skip to content

Commit

Permalink
Merge pull request #66 from gsmet/cache-strategy
Browse files Browse the repository at this point in the history
Adjust the .m2 repo cache strategy
  • Loading branch information
gsmet committed May 15, 2024
2 parents 09dc78a + bf523b1 commit 6dcfa7a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/continue-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ jobs:
uses: actions/cache/restore@v3
with:
path: ~/.m2/repository
key: m2-repository-cache-continue-${{ steps.get-release-information.outputs.branch }}
# This will never work but it should fallback to the restore key below and get the latest cache for this branch
key: m2-repository-cache-continue-${{ steps.get-release-information.outputs.branch }}-${{ github.run_id }}
restore-keys: m2-repository-cache-continue-${{ steps.get-release-information.outputs.branch }}-
- name: Clean up cache
run: |
[ -d ~/.m2/repository/io/quarkus ] && find ~/.m2/repository/io/quarkus -name 999-SNAPSHOT -type d -exec rm -rf {} +
Expand Down Expand Up @@ -123,7 +125,8 @@ jobs:
uses: actions/cache/save@v3
with:
path: ~/.m2/repository
key: m2-repository-cache-continue-${{ steps.get-release-information.outputs.branch }}
# A cache cannot be updated so we use a unique id, we use prefix matching restore-keys to restore the cache
key: m2-repository-cache-continue-${{ steps.get-release-information.outputs.branch }}-${{ github.run_id }}
- name: Post interaction comment
uses: quarkusio/conversational-release-action@main
if: always()
Expand Down

0 comments on commit 6dcfa7a

Please sign in to comment.