mirror of
https://gitea.com/actions/setup-java.git
synced 2026-07-10 19:31:55 +08:00
* feat: expose cache-primary-key output (#597) Expose the primary cache key computed by the caching logic as a new `cache-primary-key` action output, so workflows can compose the built-in setup-java cache key with actions/cache or actions/cache/restore across steps and dependent jobs. - src/cache.ts: set the `cache-primary-key` output in restore() - action.yml: declare the new output - README.md: document the new output - __tests__/cache.test.ts: assert the output is set - dist: rebuild Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * chore: rebuild dist Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
1
dist/cleanup/index.js
vendored
1
dist/cleanup/index.js
vendored
@@ -99735,6 +99735,7 @@ async function restore(id, cacheDependencyPath) {
|
||||
const primaryKey = await computeCacheKey(packageManager, cacheDependencyPath);
|
||||
core.debug(`primary key is ${primaryKey}`);
|
||||
core.saveState(STATE_CACHE_PRIMARY_KEY, primaryKey);
|
||||
core.setOutput(STATE_CACHE_PRIMARY_KEY, primaryKey);
|
||||
// No "restoreKeys" is set, to start with a clear cache after dependency update (see https://github.com/actions/setup-java/issues/269)
|
||||
const matchedKey = await cache.restoreCache(packageManager.path, primaryKey);
|
||||
if (matchedKey) {
|
||||
|
||||
1
dist/setup/index.js
vendored
1
dist/setup/index.js
vendored
@@ -130957,6 +130957,7 @@ async function restore(id, cacheDependencyPath) {
|
||||
const primaryKey = await computeCacheKey(packageManager, cacheDependencyPath);
|
||||
core_debug(`primary key is ${primaryKey}`);
|
||||
saveState(STATE_CACHE_PRIMARY_KEY, primaryKey);
|
||||
setOutput(STATE_CACHE_PRIMARY_KEY, primaryKey);
|
||||
// No "restoreKeys" is set, to start with a clear cache after dependency update (see https://github.com/actions/setup-java/issues/269)
|
||||
const matchedKey = await restoreCache(packageManager.path, primaryKey);
|
||||
if (matchedKey) {
|
||||
|
||||
Reference in New Issue
Block a user