Skip to content
Permalink
Browse files
Merge pull request #887 from actions/pdotl-version-patch
Update toolkit's cache npm module to latest. Bump cache version to v3.0.6
  • Loading branch information
Lovepreet Singh authored and GitHub committed Aug 5, 2022
2 parents 4387dbc + 9916fe1 commit f4278025ab0f432ce369118909e46deec636f50c
Showing 7 changed files with 45 additions and 27 deletions.

Some generated files are not rendered by default. Learn more.

@@ -15,6 +15,8 @@ See ["Caching dependencies to speed up workflows"](https://help.github.com/githu
* Updated the minimum runner version support from node 12 -> node 16.
* Fixed avoiding empty cache save when no files are available for caching.
* Fixed tar creation error while trying to create tar with path as `~/` home folder on `ubuntu-latest`.
* Fixed zstd failing on amazon linux 2.0 runners
* Fixed cache not working with github workspace directory or current directory

Refer [here](https://github.com/actions/cache/blob/v2/README.md) for previous versions

@@ -17,4 +17,8 @@
- Fixed tar creation error while trying to create tar with path as `~/` home folder on `ubuntu-latest`. ([issue](https://github.com/actions/cache/issues/689))

### 3.0.5
- Removed error handling by consuming actions/cache 3.0 toolkit, Now cache server error handling will be done by toolkit. ([PR](https://github.com/actions/cache/pull/834))
- Removed error handling by consuming actions/cache 3.0 toolkit, Now cache server error handling will be done by toolkit. ([PR](https://github.com/actions/cache/pull/834))

### 3.0.6
- Fixed [#809](https://github.com/actions/cache/issues/809) - zstd -d: no such file or directory error
- Fixed [#833](https://github.com/actions/cache/issues/833) - cache doesn't work with github workspace directory
@@ -1113,7 +1113,13 @@ function resolvePaths(patterns) {
.replace(new RegExp(`\\${path.sep}`, 'g'), '/');
core.debug(`Matched: ${relativeFile}`);
// Paths are made relative so the tar entries are all relative to the root of the workspace.
paths.push(`${relativeFile}`);
if (relativeFile === '') {
// path.relative returns empty string if workspace and file are equal
paths.push('.');
}
else {
paths.push(`${relativeFile}`);
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
@@ -37272,9 +37278,9 @@ function extractTar(archivePath, compressionMethod) {
function getCompressionProgram() {
switch (compressionMethod) {
case constants_1.CompressionMethod.Zstd:
return ['--use-compress-program', 'zstd -d --long=30'];
return ['--use-compress-program', 'unzstd --long=30'];
case constants_1.CompressionMethod.ZstdWithoutLong:
return ['--use-compress-program', 'zstd -d'];
return ['--use-compress-program', 'unzstd'];
default:
return ['-z'];
}
@@ -37305,9 +37311,9 @@ function createTar(archiveFolder, sourceDirectories, compressionMethod) {
function getCompressionProgram() {
switch (compressionMethod) {
case constants_1.CompressionMethod.Zstd:
return ['--use-compress-program', 'zstd -T0 --long=30'];
return ['--use-compress-program', 'zstdmt --long=30'];
case constants_1.CompressionMethod.ZstdWithoutLong:
return ['--use-compress-program', 'zstd -T0'];
return ['--use-compress-program', 'zstdmt'];
default:
return ['-z'];
}
@@ -37338,9 +37344,9 @@ function listTar(archivePath, compressionMethod) {
function getCompressionProgram() {
switch (compressionMethod) {
case constants_1.CompressionMethod.Zstd:
return ['--use-compress-program', 'zstd -d --long=30'];
return ['--use-compress-program', 'unzstd --long=30'];
case constants_1.CompressionMethod.ZstdWithoutLong:
return ['--use-compress-program', 'zstd -d'];
return ['--use-compress-program', 'unzstd'];
default:
return ['-z'];
}
@@ -1113,7 +1113,13 @@ function resolvePaths(patterns) {
.replace(new RegExp(`\\${path.sep}`, 'g'), '/');
core.debug(`Matched: ${relativeFile}`);
// Paths are made relative so the tar entries are all relative to the root of the workspace.
paths.push(`${relativeFile}`);
if (relativeFile === '') {
// path.relative returns empty string if workspace and file are equal
paths.push('.');
}
else {
paths.push(`${relativeFile}`);
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
@@ -37272,9 +37278,9 @@ function extractTar(archivePath, compressionMethod) {
function getCompressionProgram() {
switch (compressionMethod) {
case constants_1.CompressionMethod.Zstd:
return ['--use-compress-program', 'zstd -d --long=30'];
return ['--use-compress-program', 'unzstd --long=30'];
case constants_1.CompressionMethod.ZstdWithoutLong:
return ['--use-compress-program', 'zstd -d'];
return ['--use-compress-program', 'unzstd'];
default:
return ['-z'];
}
@@ -37305,9 +37311,9 @@ function createTar(archiveFolder, sourceDirectories, compressionMethod) {
function getCompressionProgram() {
switch (compressionMethod) {
case constants_1.CompressionMethod.Zstd:
return ['--use-compress-program', 'zstd -T0 --long=30'];
return ['--use-compress-program', 'zstdmt --long=30'];
case constants_1.CompressionMethod.ZstdWithoutLong:
return ['--use-compress-program', 'zstd -T0'];
return ['--use-compress-program', 'zstdmt'];
default:
return ['-z'];
}
@@ -37338,9 +37344,9 @@ function listTar(archivePath, compressionMethod) {
function getCompressionProgram() {
switch (compressionMethod) {
case constants_1.CompressionMethod.Zstd:
return ['--use-compress-program', 'zstd -d --long=30'];
return ['--use-compress-program', 'unzstd --long=30'];
case constants_1.CompressionMethod.ZstdWithoutLong:
return ['--use-compress-program', 'zstd -d'];
return ['--use-compress-program', 'unzstd'];
default:
return ['-z'];
}

Some generated files are not rendered by default. Learn more.

@@ -1,6 +1,6 @@
{
"name": "cache",
"version": "3.0.5",
"version": "3.0.6",
"private": true,
"description": "Cache dependencies and build outputs",
"main": "dist/restore/index.js",
@@ -23,7 +23,7 @@
"author": "GitHub",
"license": "MIT",
"dependencies": {
"@actions/cache": "^3.0.0",
"@actions/cache": "^3.0.1",
"@actions/core": "^1.7.0",
"@actions/exec": "^1.1.1",
"@actions/io": "^1.1.2"

0 comments on commit f427802

Please sign in to comment.