This commit is contained in:
Aarni Koskela 2025-06-20 22:58:59 +01:00 committed by GitHub
commit f298cba881
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 118 additions and 42 deletions

View file

@ -86790,9 +86790,23 @@ function run(earlyExit) {
try {
const cache = core.getInput('cache');
if (cache) {
yield saveCache(cache);
if (earlyExit) {
process.exit(0);
let shouldSave = true;
try {
shouldSave = core.getBooleanInput('cache-save', { required: false });
}
catch (e) {
// If we fail to parse the input, assume it's
// > "Input does not meet YAML 1.2 "core schema" specification."
// and assume it's the `true` default.
}
if (shouldSave) {
yield saveCache(cache);
if (earlyExit) {
process.exit(0);
}
}
else {
core.info('Not saving cache since `cache-save` is false');
}
}
}