Skip to content

Commit ab5e6d0

Browse files
authored
Merge pull request #1341 from bethanyj28/main
Update @actions/cache
2 parents 37e7d4e + 89c7d86 commit ab5e6d0

File tree

8 files changed

+93
-77
lines changed

8 files changed

+93
-77
lines changed

.licenses/npm/@actions/cache.dep.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

RELEASES.md

Lines changed: 67 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,122 +1,126 @@
11
# Releases
22

3-
### 3.0.0
3+
### 4.0.1
44

5-
- Updated minimum runner version support from node 12 -> node 16
5+
- Updated `isGhes` check
66

7-
### 3.0.1
7+
### 4.0.0
88

9-
- Added support for caching from GHES 3.5.
10-
- Fixed download issue for files > 2GB during restore.
9+
- Updated minimum runner version support from node 12 -> node 20
1110

12-
### 3.0.2
11+
### 3.3.3
1312

14-
- Added support for dynamic cache size cap on GHES.
13+
- Updates @actions/cache to v3.2.3 to fix accidental mutated path arguments to `getCacheVersion` [actions/toolkit#1378](https://github.com/actions/toolkit/pull/1378)
14+
- Additional audit fixes of npm package(s)
1515

16-
### 3.0.3
16+
### 3.3.2
1717

18-
- Fixed avoiding empty cache save when no files are available for caching. ([issue](https://github.com/actions/cache/issues/624))
18+
- Fixes bug with Azure SDK causing blob downloads to get stuck.
1919

20-
### 3.0.4
20+
### 3.3.1
2121

22-
- 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))
22+
- Reduced segment size to 128MB and segment timeout to 10 minutes to fail fast in case the cache download is stuck.
2323

24-
### 3.0.5
24+
### 3.3.0
2525

26-
- 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))
26+
- Added option to lookup cache without downloading it.
2727

28-
### 3.0.6
28+
### 3.2.6
2929

30-
- Fixed [#809](https://github.com/actions/cache/issues/809) - zstd -d: no such file or directory error
31-
- Fixed [#833](https://github.com/actions/cache/issues/833) - cache doesn't work with github workspace directory
30+
- Fix zstd not being used after zstd version upgrade to 1.5.4 on hosted runners.
3231

33-
### 3.0.7
32+
### 3.2.5
3433

35-
- Fixed [#810](https://github.com/actions/cache/issues/810) - download stuck issue. A new timeout is introduced in the download process to abort the download if it gets stuck and doesn't finish within an hour.
34+
- Added fix to prevent from setting MYSYS environment variable globally.
3635

37-
### 3.0.8
36+
### 3.2.4
3837

39-
- Fix zstd not working for windows on gnu tar in issues [#888](https://github.com/actions/cache/issues/888) and [#891](https://github.com/actions/cache/issues/891).
40-
- Allowing users to provide a custom timeout as input for aborting download of a cache segment using an environment variable `SEGMENT_DOWNLOAD_TIMEOUT_MINS`. Default is 60 minutes.
38+
- Added option to fail job on cache miss.
4139

42-
### 3.0.9
40+
### 3.2.3
4341

44-
- Enhanced the warning message for cache unavailablity in case of GHES.
42+
- Support cross os caching on Windows as an opt-in feature.
43+
- Fix issue with symlink restoration on Windows for cross-os caches.
4544

46-
### 3.0.10
45+
### 3.2.2
4746

48-
- Fix a bug with sorting inputs.
49-
- Update definition for restore-keys in README.md
47+
- Reverted the changes made in 3.2.1 to use gnu tar and zstd by default on windows.
5048

51-
### 3.0.11
49+
### 3.2.1
5250

53-
- Update toolkit version to 3.0.5 to include `@actions/core@^1.10.0`
54-
- Update `@actions/cache` to use updated `saveState` and `setOutput` functions from `@actions/core@^1.10.0`
51+
- Update `@actions/cache` on windows to use gnu tar and zstd by default and fallback to bsdtar and zstd if gnu tar is not available. ([issue](https://github.com/actions/cache/issues/984))
52+
- Added support for fallback to gzip to restore old caches on windows.
53+
- Added logs for cache version in case of a cache miss.
5554

56-
### 3.1.0-beta.1
55+
### 3.2.0
5756

58-
- Update `@actions/cache` on windows to use gnu tar and zstd by default and fallback to bsdtar and zstd if gnu tar is not available. ([issue](https://github.com/actions/cache/issues/984))
57+
- Released the two new actions - [restore](restore/action.yml) and [save](save/action.yml) for granular control on cache
5958

60-
### 3.1.0-beta.2
59+
### 3.2.0-beta.1
6160

62-
- Added support for fallback to gzip to restore old caches on windows.
61+
- Added two new actions - [restore](restore/action.yml) and [save](save/action.yml) for granular control on cache.
6362

6463
### 3.1.0-beta.3
6564

6665
- Bug fixes for bsdtar fallback if gnutar not available and gzip fallback if cache saved using old cache action on windows.
6766

68-
### 3.2.0-beta.1
67+
### 3.1.0-beta.2
6968

70-
- Added two new actions - [restore](restore/action.yml) and [save](save/action.yml) for granular control on cache.
69+
- Added support for fallback to gzip to restore old caches on windows.
7170

72-
### 3.2.0
71+
### 3.1.0-beta.1
7372

74-
- Released the two new actions - [restore](restore/action.yml) and [save](save/action.yml) for granular control on cache
73+
- Update `@actions/cache` on windows to use gnu tar and zstd by default and fallback to bsdtar and zstd if gnu tar is not available. ([issue](https://github.com/actions/cache/issues/984))
7574

76-
### 3.2.1
75+
### 3.0.11
7776

78-
- Update `@actions/cache` on windows to use gnu tar and zstd by default and fallback to bsdtar and zstd if gnu tar is not available. ([issue](https://github.com/actions/cache/issues/984))
79-
- Added support for fallback to gzip to restore old caches on windows.
80-
- Added logs for cache version in case of a cache miss.
77+
- Update toolkit version to 3.0.5 to include `@actions/core@^1.10.0`
78+
- Update `@actions/cache` to use updated `saveState` and `setOutput` functions from `@actions/core@^1.10.0`
8179

82-
### 3.2.2
80+
### 3.0.10
8381

84-
- Reverted the changes made in 3.2.1 to use gnu tar and zstd by default on windows.
82+
- Fix a bug with sorting inputs.
83+
- Update definition for restore-keys in README.md
8584

86-
### 3.2.3
85+
### 3.0.9
8786

88-
- Support cross os caching on Windows as an opt-in feature.
89-
- Fix issue with symlink restoration on Windows for cross-os caches.
87+
- Enhanced the warning message for cache unavailablity in case of GHES.
9088

91-
### 3.2.4
89+
### 3.0.8
9290

93-
- Added option to fail job on cache miss.
91+
- Fix zstd not working for windows on gnu tar in issues [#888](https://github.com/actions/cache/issues/888) and [#891](https://github.com/actions/cache/issues/891).
92+
- Allowing users to provide a custom timeout as input for aborting download of a cache segment using an environment variable `SEGMENT_DOWNLOAD_TIMEOUT_MINS`. Default is 60 minutes.
9493

95-
### 3.2.5
94+
### 3.0.7
9695

97-
- Added fix to prevent from setting MYSYS environment variable globally.
96+
- Fixed [#810](https://github.com/actions/cache/issues/810) - download stuck issue. A new timeout is introduced in the download process to abort the download if it gets stuck and doesn't finish within an hour.
9897

99-
### 3.2.6
98+
### 3.0.6
10099

101-
- Fix zstd not being used after zstd version upgrade to 1.5.4 on hosted runners.
100+
- Fixed [#809](https://github.com/actions/cache/issues/809) - zstd -d: no such file or directory error
101+
- Fixed [#833](https://github.com/actions/cache/issues/833) - cache doesn't work with github workspace directory
102102

103-
### 3.3.0
103+
### 3.0.5
104104

105-
- Added option to lookup cache without downloading it.
105+
- 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))
106106

107-
### 3.3.1
107+
### 3.0.4
108108

109-
- Reduced segment size to 128MB and segment timeout to 10 minutes to fail fast in case the cache download is stuck.
109+
- 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))
110110

111-
### 3.3.2
111+
### 3.0.3
112112

113-
- Fixes bug with Azure SDK causing blob downloads to get stuck.
113+
- Fixed avoiding empty cache save when no files are available for caching. ([issue](https://github.com/actions/cache/issues/624))
114114

115-
### 3.3.3
115+
### 3.0.2
116116

117-
- Updates @actions/cache to v3.2.3 to fix accidental mutated path arguments to `getCacheVersion` [actions/toolkit#1378](https://github.com/actions/toolkit/pull/1378)
118-
- Additional audit fixes of npm package(s)
117+
- Added support for dynamic cache size cap on GHES.
119118

120-
### 4.0.0
119+
### 3.0.1
121120

122-
- Updated minimum runner version support from node 12 -> node 20
121+
- Added support for caching from GHES 3.5.
122+
- Fixed download issue for files > 2GB during restore.
123+
124+
### 3.0.0
125+
126+
- Updated minimum runner version support from node 12 -> node 16

dist/restore-only/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,10 @@ function assertDefined(name, value) {
707707
exports.assertDefined = assertDefined;
708708
function isGhes() {
709709
const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
710-
return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM';
710+
const hostname = ghUrl.hostname.trimEnd().toUpperCase();
711+
const isGitHubHost = hostname === 'GITHUB.COM';
712+
const isGheHost = hostname.endsWith('.GHE.COM') || hostname.endsWith('.GHE.LOCALHOST');
713+
return !isGitHubHost && !isGheHost;
711714
}
712715
exports.isGhes = isGhes;
713716
//# sourceMappingURL=cacheUtils.js.map

dist/restore/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,10 @@ function assertDefined(name, value) {
707707
exports.assertDefined = assertDefined;
708708
function isGhes() {
709709
const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
710-
return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM';
710+
const hostname = ghUrl.hostname.trimEnd().toUpperCase();
711+
const isGitHubHost = hostname === 'GITHUB.COM';
712+
const isGheHost = hostname.endsWith('.GHE.COM') || hostname.endsWith('.GHE.LOCALHOST');
713+
return !isGitHubHost && !isGheHost;
711714
}
712715
exports.isGhes = isGhes;
713716
//# sourceMappingURL=cacheUtils.js.map

dist/save-only/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,10 @@ function assertDefined(name, value) {
707707
exports.assertDefined = assertDefined;
708708
function isGhes() {
709709
const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
710-
return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM';
710+
const hostname = ghUrl.hostname.trimEnd().toUpperCase();
711+
const isGitHubHost = hostname === 'GITHUB.COM';
712+
const isGheHost = hostname.endsWith('.GHE.COM') || hostname.endsWith('.GHE.LOCALHOST');
713+
return !isGitHubHost && !isGheHost;
711714
}
712715
exports.isGhes = isGhes;
713716
//# sourceMappingURL=cacheUtils.js.map

dist/save/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,10 @@ function assertDefined(name, value) {
707707
exports.assertDefined = assertDefined;
708708
function isGhes() {
709709
const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
710-
return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM';
710+
const hostname = ghUrl.hostname.trimEnd().toUpperCase();
711+
const isGitHubHost = hostname === 'GITHUB.COM';
712+
const isGheHost = hostname.endsWith('.GHE.COM') || hostname.endsWith('.GHE.LOCALHOST');
713+
return !isGitHubHost && !isGheHost;
711714
}
712715
exports.isGhes = isGhes;
713716
//# sourceMappingURL=cacheUtils.js.map

package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cache",
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"private": true,
55
"description": "Cache dependencies and build outputs",
66
"main": "dist/restore/index.js",

0 commit comments

Comments
 (0)