Title: Cache integration between `actions/setup-java` and `actions/cache` / `actions/cache/restore` · Issue #597 · actions/setup-java · GitHub
Open Graph Title: Cache integration between `actions/setup-java` and `actions/cache` / `actions/cache/restore` · Issue #597 · actions/setup-java
X Title: Cache integration between `actions/setup-java` and `actions/cache` / `actions/cache/restore` · Issue #597 · actions/setup-java
Description: 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 log...
Open Graph Description: 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/et...
X Description: 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/et...
Opengraph URL: https://github.com/actions/setup-java/issues/597
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Cache integration between `actions/setup-java` and `actions/cache` / `actions/cache/restore`","articleBody":"**Description:**\r\nExpose `cache-primary-key` as an output to allow integration with `actions/cache`and `actions/cache/restore`.\r\n\r\n**Justification:**\r\nCaching 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.\r\n\r\nThat being said, I have dependent jobs that I would like to guarantee that the same cache is used by forcing the same cache key.\r\n\r\nI 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`.\r\n\r\nAnother 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\".\r\n\r\n\r\n**Are you willing to submit a PR?**\r\n\r\nMy understanding is that a small change [here](https://github.com/actions/setup-java/blob/7a445ee88d4e23b52c33fdc7601e40278616c7f8/src/cache.ts#L113) to set an output, and to `action.yml` to declare the output, would suffice.\r\nI 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.\r\n","author":{"url":"https://github.com/caquino","@type":"Person","name":"caquino"},"datePublished":"2024-02-14T13:41:11.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/597/setup-java/issues/597"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4484920a-28b5-aa1b-0429-199f5118a5b0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C9F4:32BCF4:46ED47:47F94B:6A5145B7 |
| html-safe-nonce | 17be74282e85d28222d1c616c495d57c9d185c2ad087511067c13f2f2a91d78b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOUY0OjMyQkNGNDo0NkVENDc6NDdGOTRCOjZBNTE0NUI3IiwidmlzaXRvcl9pZCI6IjU4ODY5NTE5NjA2MzA1NzMzNSIsInJlZ2lvbl9lZGdlIjoic2VhIiwicmVnaW9uX3JlbmRlciI6InNlYSJ9 |
| visitor-hmac | 96a02587c161d532c3ae41d9b33104a2404b387a65df7e4d6163d3441de4c3d7 |
| hovercard-subject-tag | issue:2134382646 |
| github-keyboard-shortcuts | repository,issues,actions,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/actions/setup-java/597/issue_layout |
| twitter:image | https://opengraph.githubassets.com/baeabe0b2e07b6f28d5dcd132ea013e25fdb1f731a16c25d112d17ee1d5778af/actions/setup-java/issues/597 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/baeabe0b2e07b6f28d5dcd132ea013e25fdb1f731a16c25d112d17ee1d5778af/actions/setup-java/issues/597 |
| og:image:alt | 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/et... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | caquino |
| hostname | github.com |
| expected-hostname | github.com |
| None | e840f405b2718e8f2d55aafa9ff27dbce17e29d0c253011d05ea0fea3c78baff |
| turbo-cache-control | no-preview |
| go-import | github.com/actions/setup-java git https://github.com/actions/setup-java.git |
| octolytics-dimension-user_id | 44036562 |
| octolytics-dimension-user_login | actions |
| octolytics-dimension-repository_id | 196057608 |
| octolytics-dimension-repository_nwo | actions/setup-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 196057608 |
| octolytics-dimension-repository_network_root_nwo | actions/setup-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b78565f6aa43cc5323c9935ec11b22cca7bb0a62 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width