Set output cache-hit to indicate if cache was hit (#275)

This commit is contained in:
Mario Schünadel 2022-04-07 10:58:22 +02:00 committed by GitHub
parent 0aa6f2a84f
commit d2e3f417a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 0 deletions

View file

@ -61925,9 +61925,11 @@ function restore(id) {
]);
if (matchedKey) {
core.saveState(CACHE_MATCHED_KEY, matchedKey);
core.setOutput('cache-hit', matchedKey === primaryKey);
core.info(`Cache restored from key: ${matchedKey}`);
}
else {
core.setOutput('cache-hit', false);
core.info(`${packageManager.id} cache is not found`);
}
});

2
dist/setup/index.js vendored
View file

@ -18662,9 +18662,11 @@ function restore(id) {
]);
if (matchedKey) {
core.saveState(CACHE_MATCHED_KEY, matchedKey);
core.setOutput('cache-hit', matchedKey === primaryKey);
core.info(`Cache restored from key: ${matchedKey}`);
}
else {
core.setOutput('cache-hit', false);
core.info(`${packageManager.id} cache is not found`);
}
});