1
0
Fork 0
mirror of https://github.com/actions/cache.git synced 2025-07-10 21:00:46 +00:00

Use zstd instead of gzip

This commit is contained in:
BSKY 2020-03-21 10:57:48 +09:00
parent eb78578266
commit 7c7ab7c49e
5 changed files with 31 additions and 13 deletions

View file

@ -39,7 +39,15 @@ export async function extractTar(archivePath: string): Promise<void> {
// Create directory to extract tar into
const workingDirectory = getWorkingDirectory();
await io.mkdirP(workingDirectory);
const args = ["-xz", "-f", archivePath, "-P", "-C", workingDirectory];
const args = [
"--use-compress-program",
"zstd --long=31 -d",
"-xf",
archivePath,
"-P",
"-C",
workingDirectory
];
await execTar(args);
}
@ -56,8 +64,9 @@ export async function createTar(
const workingDirectory = getWorkingDirectory();
const args = [
"-cz",
"-f",
"--use-compress-program",
"zstd -T0 --long=31",
"-cf",
CacheFilename,
"-C",
workingDirectory,