mirror of
https://github.com/actions/cache.git
synced 2025-04-19 18:46:46 +00:00
Rename option to lookup-only
This commit is contained in:
parent
d1960e64f9
commit
2ef4e0621f
16 changed files with 68 additions and 68 deletions
18
dist/restore-only/index.js
vendored
18
dist/restore-only/index.js
vendored
|
@ -4979,7 +4979,7 @@ var Inputs;
|
|||
Inputs["RestoreKeys"] = "restore-keys";
|
||||
Inputs["UploadChunkSize"] = "upload-chunk-size";
|
||||
Inputs["EnableCrossOsArchive"] = "enableCrossOsArchive";
|
||||
Inputs["DryRun"] = "dry-run"; // Input for cache, restore action
|
||||
Inputs["LookupOnly"] = "lookup-only"; // Input for cache, restore action
|
||||
})(Inputs = exports.Inputs || (exports.Inputs = {}));
|
||||
var Outputs;
|
||||
(function (Outputs) {
|
||||
|
@ -41810,7 +41810,7 @@ function getDownloadOptions(copy) {
|
|||
downloadConcurrency: 8,
|
||||
timeoutInMs: 30000,
|
||||
segmentTimeoutInMs: 3600000,
|
||||
dryRun: false
|
||||
lookupOnly: false
|
||||
};
|
||||
if (copy) {
|
||||
if (typeof copy.useAzureSdk === 'boolean') {
|
||||
|
@ -41825,8 +41825,8 @@ function getDownloadOptions(copy) {
|
|||
if (typeof copy.segmentTimeoutInMs === 'number') {
|
||||
result.segmentTimeoutInMs = copy.segmentTimeoutInMs;
|
||||
}
|
||||
if (typeof copy.dryRun === 'boolean') {
|
||||
result.dryRun = copy.dryRun;
|
||||
if (typeof copy.lookupOnly === 'boolean') {
|
||||
result.lookupOnly = copy.lookupOnly;
|
||||
}
|
||||
}
|
||||
const segmentDownloadTimeoutMins = process.env['SEGMENT_DOWNLOAD_TIMEOUT_MINS'];
|
||||
|
@ -41840,7 +41840,7 @@ function getDownloadOptions(copy) {
|
|||
core.debug(`Request timeout (ms): ${result.timeoutInMs}`);
|
||||
core.debug(`Cache segment download timeout mins env var: ${process.env['SEGMENT_DOWNLOAD_TIMEOUT_MINS']}`);
|
||||
core.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`);
|
||||
core.debug(`Dry run: ${result.dryRun}`);
|
||||
core.debug(`Lookup only: ${result.lookupOnly}`);
|
||||
return result;
|
||||
}
|
||||
exports.getDownloadOptions = getDownloadOptions;
|
||||
|
@ -47289,8 +47289,8 @@ function restoreCache(paths, primaryKey, restoreKeys, options, enableCrossOsArch
|
|||
// Cache not found
|
||||
return undefined;
|
||||
}
|
||||
if (options === null || options === void 0 ? void 0 : options.dryRun) {
|
||||
core.info('Dry run - skipping download');
|
||||
if (options === null || options === void 0 ? void 0 : options.lookupOnly) {
|
||||
core.info('Lookup only - skipping download');
|
||||
return cacheEntry.cacheKey;
|
||||
}
|
||||
archivePath = path.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod));
|
||||
|
@ -50505,8 +50505,8 @@ function restoreImpl(stateProvider) {
|
|||
required: true
|
||||
});
|
||||
const enableCrossOsArchive = utils.getInputAsBool(constants_1.Inputs.EnableCrossOsArchive);
|
||||
const dryRun = utils.getInputAsBool(constants_1.Inputs.DryRun);
|
||||
const cacheKey = yield cache.restoreCache(cachePaths, primaryKey, restoreKeys, { dryRun: dryRun }, enableCrossOsArchive);
|
||||
const lookupOnly = utils.getInputAsBool(constants_1.Inputs.LookupOnly);
|
||||
const cacheKey = yield cache.restoreCache(cachePaths, primaryKey, restoreKeys, { lookupOnly: lookupOnly }, enableCrossOsArchive);
|
||||
if (!cacheKey) {
|
||||
core.info(`Cache not found for input keys: ${[
|
||||
primaryKey,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue