Release v1.0.1

This commit is contained in:
Josh Gross 2019-11-05 15:42:18 -05:00
parent 9d8c7b4041
commit 0f810ad45a
6 changed files with 91 additions and 83 deletions

View file

@ -20,7 +20,10 @@ async function run() {
const primaryKey = core.getInput(Inputs.Key, { required: true });
core.saveState(State.CacheKey, primaryKey);
const restoreKeys = core.getInput(Inputs.RestoreKeys).split("\n");
const restoreKeys = core
.getInput(Inputs.RestoreKeys)
.split("\n")
.filter(x => x !== "");
const keys = [primaryKey, ...restoreKeys];
core.debug("Resolved Keys:");
@ -52,7 +55,7 @@ async function run() {
const cacheEntry = await cacheHttpClient.getCacheEntry(keys);
if (!cacheEntry) {
core.info(
`Cache not found for input keys: ${JSON.stringify(keys)}.`
`Cache not found for input keys: ${keys.join(", ")}.`
);
return;
}

View file

@ -54,12 +54,12 @@ async function run() {
core.debug(`Tar Path: ${tarPath}`);
await exec(`"${tarPath}"`, args);
const fileSizeLimit = 200 * 1024 * 1024; // 200MB
const fileSizeLimit = 400 * 1024 * 1024; // 400MB
const archiveFileSize = fs.statSync(archivePath).size;
core.debug(`File Size: ${archiveFileSize}`);
if (archiveFileSize > fileSizeLimit) {
core.warning(
`Cache size of ${archiveFileSize} bytes is over the 200MB limit, not saving cache.`
`Cache size of ${archiveFileSize} bytes is over the 400MB limit, not saving cache.`
);
return;
}