From 009d23987ca1c6b5c26c83318bfdb6974971f298 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Mar 2022 07:43:30 -0700 Subject: [PATCH] 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] * build dist Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sergey Vilgelm --- dist/post_run/index.js | 14 ++++++++++---- dist/run/index.js | 14 ++++++++++---- package-lock.json | 14 +++++++------- package.json | 2 +- 4 files changed, 28 insertions(+), 16 deletions(-) diff --git a/dist/post_run/index.js b/dist/post_run/index.js index ff94d8c..072909b 100644 --- a/dist/post_run/index.js +++ b/dist/post_run/index.js @@ -58,6 +58,15 @@ function checkKey(key) { throw new ValidationError(`Key Validation Error: ${key} cannot contain commas.`); } } +/** + * isFeatureAvailable to check the presence of Actions cache service + * + * @returns boolean return true if Actions cache service feature is available, otherwise false + */ +function isFeatureAvailable() { + return !!process.env['ACTIONS_CACHE_URL']; +} +exports.isFeatureAvailable = isFeatureAvailable; /** * Restores cache from keys * @@ -208,10 +217,7 @@ const options_1 = __nccwpck_require__(6215); const requestUtils_1 = __nccwpck_require__(3981); const versionSalt = '1.0'; function getCacheApiUrl(resource) { - // Ideally we just use ACTIONS_CACHE_URL - const baseUrl = (process.env['ACTIONS_CACHE_URL'] || - process.env['ACTIONS_RUNTIME_URL'] || - '').replace('pipelines', 'artifactcache'); + const baseUrl = process.env['ACTIONS_CACHE_URL'] || ''; if (!baseUrl) { throw new Error('Cache Service Url not found, unable to restore cache.'); } diff --git a/dist/run/index.js b/dist/run/index.js index 6d38e1b..1a798cd 100644 --- a/dist/run/index.js +++ b/dist/run/index.js @@ -58,6 +58,15 @@ function checkKey(key) { throw new ValidationError(`Key Validation Error: ${key} cannot contain commas.`); } } +/** + * isFeatureAvailable to check the presence of Actions cache service + * + * @returns boolean return true if Actions cache service feature is available, otherwise false + */ +function isFeatureAvailable() { + return !!process.env['ACTIONS_CACHE_URL']; +} +exports.isFeatureAvailable = isFeatureAvailable; /** * Restores cache from keys * @@ -208,10 +217,7 @@ const options_1 = __nccwpck_require__(6215); const requestUtils_1 = __nccwpck_require__(3981); const versionSalt = '1.0'; function getCacheApiUrl(resource) { - // Ideally we just use ACTIONS_CACHE_URL - const baseUrl = (process.env['ACTIONS_CACHE_URL'] || - process.env['ACTIONS_RUNTIME_URL'] || - '').replace('pipelines', 'artifactcache'); + const baseUrl = process.env['ACTIONS_CACHE_URL'] || ''; if (!baseUrl) { throw new Error('Cache Service Url not found, unable to restore cache.'); } diff --git a/package-lock.json b/package-lock.json index a15644e..88e4e8e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "3.1.0", "license": "MIT", "dependencies": { - "@actions/cache": "^1.0.10", + "@actions/cache": "^2.0.0", "@actions/core": "^1.6.0", "@actions/exec": "^1.1.1", "@actions/github": "^5.0.0", @@ -32,9 +32,9 @@ } }, "node_modules/@actions/cache": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-1.0.11.tgz", - "integrity": "sha512-L+VCF1JpFePAzxkYtpwYDWnd0WzSU1DoNPE2cuINKpEie27ONH0Cpqt40cG8NiJW4zbZLN+kNkEDo3F2MkUuRw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-2.0.0.tgz", + "integrity": "sha512-d7n8ul6HjWX6oDrNEPoqn8ZvqyyDhp9Uek6WOxALyxGVsXU+8+ND+viD3UfrXVWfs/GQiqI5Eq4cOozZj0yRFQ==", "dependencies": { "@actions/core": "^1.2.6", "@actions/exec": "^1.0.1", @@ -3009,9 +3009,9 @@ }, "dependencies": { "@actions/cache": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-1.0.11.tgz", - "integrity": "sha512-L+VCF1JpFePAzxkYtpwYDWnd0WzSU1DoNPE2cuINKpEie27ONH0Cpqt40cG8NiJW4zbZLN+kNkEDo3F2MkUuRw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-2.0.0.tgz", + "integrity": "sha512-d7n8ul6HjWX6oDrNEPoqn8ZvqyyDhp9Uek6WOxALyxGVsXU+8+ND+viD3UfrXVWfs/GQiqI5Eq4cOozZj0yRFQ==", "requires": { "@actions/core": "^1.2.6", "@actions/exec": "^1.0.1", diff --git a/package.json b/package.json index 6d3ecb7..758af71 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "author": "golangci", "license": "MIT", "dependencies": { - "@actions/cache": "^1.0.10", + "@actions/cache": "^2.0.0", "@actions/core": "^1.6.0", "@actions/exec": "^1.1.1", "@actions/github": "^5.0.0",