From 451e84b61038c9b3a2fca0d6cc92bf4a47141d07 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Jun 2022 09:56:42 +0200 Subject: [PATCH] build(deps): bump @actions/cache from 2.0.4 to 2.0.5 (#484) Co-authored-by: Kamil Samigullin --- dist/post_run/index.js | 3 +++ dist/run/index.js | 3 +++ package-lock.json | 14 +++++++------- package.json | 2 +- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/dist/post_run/index.js b/dist/post_run/index.js index d9d10104af..9f095fa498 100644 --- a/dist/post_run/index.js +++ b/dist/post_run/index.js @@ -142,6 +142,9 @@ function saveCache(paths, key, options) { const cachePaths = yield utils.resolvePaths(paths); core.debug('Cache Paths:'); core.debug(`${JSON.stringify(cachePaths)}`); + if (cachePaths.length === 0) { + throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); + } const archiveFolder = yield utils.createTempDirectory(); const archivePath = path.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core.debug(`Archive Path: ${archivePath}`); diff --git a/dist/run/index.js b/dist/run/index.js index ff0df9a476..e306e253be 100644 --- a/dist/run/index.js +++ b/dist/run/index.js @@ -142,6 +142,9 @@ function saveCache(paths, key, options) { const cachePaths = yield utils.resolvePaths(paths); core.debug('Cache Paths:'); core.debug(`${JSON.stringify(cachePaths)}`); + if (cachePaths.length === 0) { + throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); + } const archiveFolder = yield utils.createTempDirectory(); const archivePath = path.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core.debug(`Archive Path: ${archivePath}`); diff --git a/package-lock.json b/package-lock.json index 50d1d1d789..21afbec3cd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "3.1.0", "license": "MIT", "dependencies": { - "@actions/cache": "^2.0.4", + "@actions/cache": "^2.0.5", "@actions/core": "^1.8.0", "@actions/exec": "^1.1.1", "@actions/github": "^5.0.3", @@ -32,9 +32,9 @@ } }, "node_modules/@actions/cache": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-2.0.4.tgz", - "integrity": "sha512-B6c8JNTcgMUcstwbCSCjgHrSxzJ5ABxX6Y1Q9lfe8lT08ZVrnUetEZfxYRCwTgAf/gHsjdgWHW4O8Z+VvPvUuQ==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-2.0.5.tgz", + "integrity": "sha512-aG06dsgcVtiuHLJsIfwrDtvzNNJQ+Iqk8DQt1IeI6gG7ezmLaSdZkHEwA/DNrm5TtOahLcgGEo2SXqbFElVMQg==", "dependencies": { "@actions/core": "^1.2.6", "@actions/exec": "^1.0.1", @@ -3102,9 +3102,9 @@ }, "dependencies": { "@actions/cache": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-2.0.4.tgz", - "integrity": "sha512-B6c8JNTcgMUcstwbCSCjgHrSxzJ5ABxX6Y1Q9lfe8lT08ZVrnUetEZfxYRCwTgAf/gHsjdgWHW4O8Z+VvPvUuQ==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-2.0.5.tgz", + "integrity": "sha512-aG06dsgcVtiuHLJsIfwrDtvzNNJQ+Iqk8DQt1IeI6gG7ezmLaSdZkHEwA/DNrm5TtOahLcgGEo2SXqbFElVMQg==", "requires": { "@actions/core": "^1.2.6", "@actions/exec": "^1.0.1", diff --git a/package.json b/package.json index 7ecda6f363..f5b4dcb663 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "author": "golangci", "license": "MIT", "dependencies": { - "@actions/cache": "^2.0.4", + "@actions/cache": "^2.0.5", "@actions/core": "^1.8.0", "@actions/exec": "^1.1.1", "@actions/github": "^5.0.3",