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:
parent
eb78578266
commit
7c7ab7c49e
5 changed files with 31 additions and 13 deletions
15
src/tar.ts
15
src/tar.ts
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue