You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cache integration between actions/setup-java and actions/cache / actions/cache/restore #597
Description:
Expose cache-primary-key as an output to allow integration with actions/cacheand actions/cache/restore.
Justification:
Caching rules differ according to the build tool used (mvn/sbt/etc), and I would like to leverage the logic already implemented on actions/setup-java to handle the specifics for each build tool.
That being said, I have dependent jobs that I would like to guarantee that the same cache is used by forcing the same cache key.
I understand that any advanced cache usage should be done manually using actions/cache, but just exposing the cache key used by actions/setup-java as an output, like cache-hit, would make it possible to extend the functionality from actions/setup-java.
Another possibility would be for actions/setup-java not only to set an output with the cache key but also to accept an input cache-key, but I think this goes into the realm of "should be done using actions/cache".
Are you willing to submit a PR?
My understanding is that a small change here to set an output, and to action.yml to declare the output, would suffice.
I would be more than happy to submit a PR, but before doing so, I would like to check with the team to see if this aligns with the vision for the future.
changed the title [-]Cache integration between `actions/setup-java` and `actions/cache`/`actions/cache/restore`[/-][+]Cache integration between `actions/setup-java` and `actions/cache` / `actions/cache/restore`[/+]on Feb 14, 2024
Activity
[-]Cache integration between `actions/setup-java` and `actions/cache`/`actions/cache/restore`[/-][+]Cache integration between `actions/setup-java` and `actions/cache` / `actions/cache/restore`[/+]v-HarithaVattikuti commentedon Feb 15, 2024
Hello @caquino
Thank you for creating this feature request. We will investigate it and get back to you as soon as we have some feedback.
brunoborges commentedon Jul 8, 2026
Related: #705
feat: expose cache-primary-key output (#597) [v5 backport] (#1089)
feat: expose cache-primary-key output (#597) (#1088)
⬆️ Update actions/setup-java action to v5.6.0 (#2040)