Add dry-run option

This commit is contained in:
Marc Mueller 2022-12-23 14:26:44 +01:00
parent eda4a77b7c
commit 1bb6d2503c
13 changed files with 172 additions and 25 deletions

View file

@ -4978,7 +4978,8 @@ var Inputs;
Inputs["Path"] = "path";
Inputs["RestoreKeys"] = "restore-keys";
Inputs["UploadChunkSize"] = "upload-chunk-size";
Inputs["EnableCrossOsArchive"] = "enableCrossOsArchive"; // Input for cache, restore, save action
Inputs["EnableCrossOsArchive"] = "enableCrossOsArchive";
Inputs["DryRun"] = "dry-run"; // Input for cache, restore action
})(Inputs = exports.Inputs || (exports.Inputs = {}));
var Outputs;
(function (Outputs) {
@ -50504,7 +50505,7 @@ function restoreImpl(stateProvider) {
required: true
});
const enableCrossOsArchive = utils.getInputAsBool(constants_1.Inputs.EnableCrossOsArchive);
const cacheKey = yield cache.restoreCache(cachePaths, primaryKey, restoreKeys, {}, enableCrossOsArchive);
const cacheKey = yield cache.restoreCache(cachePaths, primaryKey, restoreKeys, { dryRun: core.getBooleanInput(constants_1.Inputs.DryRun) }, enableCrossOsArchive);
if (!cacheKey) {
core.info(`Cache not found for input keys: ${[
primaryKey,