3
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2025-04-23 03:45:31 +00:00

Avoid re-evaluation of the key input in restore implementation

This commit is contained in:
itchyny 2024-04-14 22:44:33 +09:00
parent 2cdf405574
commit 5cdbd5c7ec
3 changed files with 3 additions and 7 deletions

View file

@ -69,11 +69,7 @@ export async function restoreImpl(
// Store the matched cache key in states
stateProvider.setState(State.CacheMatchedKey, cacheKey);
const isExactKeyMatch = utils.isExactKeyMatch(
core.getInput(Inputs.Key, { required: true }),
cacheKey
);
const isExactKeyMatch = utils.isExactKeyMatch(primaryKey, cacheKey);
core.setOutput(Outputs.CacheHit, isExactKeyMatch.toString());
if (lookupOnly) {
core.info(`Cache found and can be restored from key: ${cacheKey}`);