add support for read-only cache

This commit is contained in:
erik-krogh 2022-11-22 10:17:29 +01:00
commit a88d0603fe
No known key found for this signature in database
8 changed files with 79 additions and 3 deletions

View file

@ -44,6 +44,11 @@ async function run(): Promise<void> {
required: true
});
if (utils.getInputAsBoolean(Inputs.ReadOnly)) {
core.info(`Cache is read-only, skipping save.`);
return;
}
const cacheId = await cache.saveCache(cachePaths, primaryKey, {
uploadChunkSize: utils.getInputAsInt(Inputs.UploadChunkSize)
});