slachiewicz commented on code in PR #339:
URL:
https://github.com/apache/maven-gh-actions-shared/pull/339#discussion_r4247563381
##########
.github/workflows/maven-verify.yml:
##########
@@ -314,6 +314,9 @@ jobs:
with:
java-version: ${{ inputs.ff-jdk-toolchain }}
distribution: ${{ inputs.ff-jdk-distribution }}
+ cache-jdk: true
+ # only the default branch saves caches; other branches and pull
requests restore them
+ cache-read-only: ${{ github.ref_name !=
github.event.repository.default_branch }}
Review Comment:
@olamy it isn’t MojoHaus-only. maven-surefire holds 5.9 GB: 1.9 GB for
master and about 600 MB for each pull request, readable only by that PR. Five
of the seven PR entries belong to PRs already merged, so 3.0 GB will never be
read again, and roughly seven more PRs push the repo past 10 GB, where GitHub
starts evicting the least recently used entries, master’s included.
apache/maven is already there: 9.3 of its 9.9 GB are three Dependabot branches
of maven-3.10.x, and master has 34 MB left.
@slawekjaranowski agreed, maintenance lines like maven-4.0.x should keep
their own caches. I’ll narrow the default: pull requests and dependabot/**
branches restore without saving, and every other pushed branch (default,
maven-*.x, other long-lived ones) saves as before. A project that wants only
its default branch to save, as MojoHaus does, sets an input for that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]