Merge 5cdbd5c7ec0c2f079058d8a75ca2d15388ab1ddd into 1bd1e32a3bdc45362d1e726936510720a7c30a57

This commit is contained in:
itchyny 2024-12-12 01:59:50 -05:00 committed by GitHub
commit be16613b9f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 7 deletions

View File

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

View File

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

View File

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