mirror of
https://code.forgejo.org/actions/setup-python
synced 2025-06-10 05:12:19 +02:00
Add cache-save: false
option
This commit is contained in:
parent
7e8faf07b9
commit
8f0a0b0eda
5 changed files with 85 additions and 9 deletions
20
dist/cache-save/index.js
vendored
20
dist/cache-save/index.js
vendored
|
@ -80475,9 +80475,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');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue