mirror of
https://github.com/actions/setup-java.git
synced 2025-03-13 09:37:03 +00:00
Only set cache-hit on exact match of cache key
This commit is contained in:
parent
01f97385c3
commit
edfea5c367
3 changed files with 3 additions and 3 deletions
2
dist/cleanup/index.js
vendored
2
dist/cleanup/index.js
vendored
|
@ -61873,7 +61873,7 @@ function restore(id) {
|
|||
]);
|
||||
if (matchedKey) {
|
||||
core.saveState(CACHE_MATCHED_KEY, matchedKey);
|
||||
core.setOutput('cache-hit', true);
|
||||
core.setOutput('cache-hit', matchedKey === primaryKey);
|
||||
core.info(`Cache restored from key: ${matchedKey}`);
|
||||
}
|
||||
else {
|
||||
|
|
2
dist/setup/index.js
vendored
2
dist/setup/index.js
vendored
|
@ -18664,7 +18664,7 @@ function restore(id) {
|
|||
]);
|
||||
if (matchedKey) {
|
||||
core.saveState(CACHE_MATCHED_KEY, matchedKey);
|
||||
core.setOutput('cache-hit', true);
|
||||
core.setOutput('cache-hit', matchedKey === primaryKey);
|
||||
core.info(`Cache restored from key: ${matchedKey}`);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -77,7 +77,7 @@ export async function restore(id: string) {
|
|||
]);
|
||||
if (matchedKey) {
|
||||
core.saveState(CACHE_MATCHED_KEY, matchedKey);
|
||||
core.setOutput('cache-hit', true);
|
||||
core.setOutput('cache-hit', matchedKey === primaryKey);
|
||||
core.info(`Cache restored from key: ${matchedKey}`);
|
||||
} else {
|
||||
core.setOutput('cache-hit', false);
|
||||
|
|
Loading…
Add table
Reference in a new issue