Skip to content

Commit 009d239

Browse files
build(deps): bump @actions/cache from 1.0.10 to 2.0.0 (#432)
* build(deps): bump @actions/cache from 1.0.10 to 2.0.0 Bumps [@actions/cache](https://github.com/actions/toolkit/tree/HEAD/packages/cache) from 1.0.10 to 2.0.0. - [Release notes](https://github.com/actions/toolkit/releases) - [Changelog](https://github.com/actions/toolkit/blob/main/packages/cache/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/cache) --- updated-dependencies: - dependency-name: "@actions/cache" dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * build dist Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sergey Vilgelm <[email protected]>
1 parent 6f887e0 commit 009d239

File tree

4 files changed

+28
-16
lines changed

4 files changed

+28
-16
lines changed

dist/post_run/index.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,15 @@ function checkKey(key) {
5858
throw new ValidationError(`Key Validation Error: ${key} cannot contain commas.`);
5959
}
6060
}
61+
/**
62+
* isFeatureAvailable to check the presence of Actions cache service
63+
*
64+
* @returns boolean return true if Actions cache service feature is available, otherwise false
65+
*/
66+
function isFeatureAvailable() {
67+
return !!process.env['ACTIONS_CACHE_URL'];
68+
}
69+
exports.isFeatureAvailable = isFeatureAvailable;
6170
/**
6271
* Restores cache from keys
6372
*
@@ -208,10 +217,7 @@ const options_1 = __nccwpck_require__(6215);
208217
const requestUtils_1 = __nccwpck_require__(3981);
209218
const versionSalt = '1.0';
210219
function getCacheApiUrl(resource) {
211-
// Ideally we just use ACTIONS_CACHE_URL
212-
const baseUrl = (process.env['ACTIONS_CACHE_URL'] ||
213-
process.env['ACTIONS_RUNTIME_URL'] ||
214-
'').replace('pipelines', 'artifactcache');
220+
const baseUrl = process.env['ACTIONS_CACHE_URL'] || '';
215221
if (!baseUrl) {
216222
throw new Error('Cache Service Url not found, unable to restore cache.');
217223
}

dist/run/index.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,15 @@ function checkKey(key) {
5858
throw new ValidationError(`Key Validation Error: ${key} cannot contain commas.`);
5959
}
6060
}
61+
/**
62+
* isFeatureAvailable to check the presence of Actions cache service
63+
*
64+
* @returns boolean return true if Actions cache service feature is available, otherwise false
65+
*/
66+
function isFeatureAvailable() {
67+
return !!process.env['ACTIONS_CACHE_URL'];
68+
}
69+
exports.isFeatureAvailable = isFeatureAvailable;
6170
/**
6271
* Restores cache from keys
6372
*
@@ -208,10 +217,7 @@ const options_1 = __nccwpck_require__(6215);
208217
const requestUtils_1 = __nccwpck_require__(3981);
209218
const versionSalt = '1.0';
210219
function getCacheApiUrl(resource) {
211-
// Ideally we just use ACTIONS_CACHE_URL
212-
const baseUrl = (process.env['ACTIONS_CACHE_URL'] ||
213-
process.env['ACTIONS_RUNTIME_URL'] ||
214-
'').replace('pipelines', 'artifactcache');
220+
const baseUrl = process.env['ACTIONS_CACHE_URL'] || '';
215221
if (!baseUrl) {
216222
throw new Error('Cache Service Url not found, unable to restore cache.');
217223
}

package-lock.json

Lines changed: 7 additions & 7 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
@@ -24,7 +24,7 @@
2424
"author": "golangci",
2525
"license": "MIT",
2626
"dependencies": {
27-
"@actions/cache": "^1.0.10",
27+
"@actions/cache": "^2.0.0",
2828
"@actions/core": "^1.6.0",
2929
"@actions/exec": "^1.1.1",
3030
"@actions/github": "^5.0.0",

0 commit comments

Comments
 (0)