@@ -86081,6 +86081,7 @@ function restoreCache() {
8608186081 const cacheHit = matchingKey === key;
8608286082 (0, utils_1.setCacheHitOutput)(cacheHit);
8608386083 (0, utils_1.setCacheSizeOutput)(obj.size);
86084+ (0, utils_1.setCacheMatchedKeyOutput)(matchingKey);
8608486085 if (lookupOnly) {
8608586086 if (cacheHit && obj.size > 0) {
8608686087 core.info(`Cache Hit. NOT Downloading cache from s3 because lookup-only is set. bucket: ${bucket}, object: ${obj.name}`);
@@ -86103,6 +86104,7 @@ function restoreCache() {
8610386104 catch (e) {
8610486105 core.info("Restore s3 cache failed: " + e.message);
8610586106 (0, utils_1.setCacheHitOutput)(false);
86107+ (0, utils_1.setCacheMatchedKeyOutput)("");
8610686108 if (useFallback) {
8610786109 if ((0, utils_1.isGhes)()) {
8610886110 core.warning("Cache fallback is not supported on Github Enterpise.");
@@ -86112,6 +86114,7 @@ function restoreCache() {
8611286114 const fallbackMatchingKey = yield cache.restoreCache(paths, key, restoreKeys);
8611386115 if (fallbackMatchingKey) {
8611486116 (0, utils_1.setCacheHitOutput)(fallbackMatchingKey === key);
86117+ (0, utils_1.setCacheMatchedKeyOutput)(fallbackMatchingKey);
8611586118 core.info("Fallback cache restored successfully");
8611686119 }
8611786120 else {
@@ -86212,6 +86215,7 @@ exports.getInputAsInt = getInputAsInt;
8621286215exports.formatSize = formatSize;
8621386216exports.setCacheHitOutput = setCacheHitOutput;
8621486217exports.setCacheSizeOutput = setCacheSizeOutput;
86218+ exports.setCacheMatchedKeyOutput = setCacheMatchedKeyOutput;
8621586219exports.findObject = findObject;
8621686220exports.listObjects = listObjects;
8621786221exports.saveMatchedKey = saveMatchedKey;
@@ -86296,6 +86300,9 @@ function setCacheHitOutput(isCacheHit) {
8629686300function setCacheSizeOutput(cacheSize) {
8629786301 core.setOutput("cache-size", cacheSize.toString());
8629886302}
86303+ function setCacheMatchedKeyOutput(cacheMatchedKey) {
86304+ core.setOutput("cache-matched-key", cacheMatchedKey);
86305+ }
8629986306function findObject(mc, bucket, key, restoreKeys, compressionMethod) {
8630086307 return __awaiter(this, void 0, void 0, function* () {
8630186308 core.debug("Key: " + JSON.stringify(key));
0 commit comments