This commit is contained in:
Josh Soref 2022-05-07 03:15:29 -07:00 committed by GitHub
commit e9b65c3cba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 59 additions and 13 deletions

6
dist/save/index.js vendored
View file

@ -4614,6 +4614,7 @@ var Inputs;
var Outputs;
(function (Outputs) {
Outputs["CacheHit"] = "cache-hit";
Outputs["CacheKey"] = "cache-key";
})(Outputs = exports.Outputs || (exports.Outputs = {}));
var State;
(function (State) {
@ -37444,8 +37445,9 @@ function isExactKeyMatch(key, cacheKey) {
}) === 0);
}
exports.isExactKeyMatch = isExactKeyMatch;
function setCacheState(state) {
function setCacheState(state, key) {
core.saveState(constants_1.State.CacheMatchedKey, state);
core.setOutput(constants_1.Outputs.CacheKey, key);
}
exports.setCacheState = setCacheState;
function setCacheHitOutput(isCacheHit) {
@ -37455,7 +37457,7 @@ exports.setCacheHitOutput = setCacheHitOutput;
function setOutputAndState(key, cacheKey) {
setCacheHitOutput(isExactKeyMatch(key, cacheKey));
// Store the matched cache key if it exists
cacheKey && setCacheState(cacheKey);
cacheKey && setCacheState(cacheKey, key);
}
exports.setOutputAndState = setOutputAndState;
function getCacheState() {