mirror of
				https://gitea.com/actions/cache.git
				synced 2025-10-31 07:47:07 +00:00 
			
		
		
		
	Compare commits
	
		
			23 Commits
		
	
	
		
			vsvipul/ad
			...
			v3.0.11
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 9b0c1fce7a | ||
|   | 18103f63fe | ||
|   | 3e383cd9c3 | ||
|   | 43428ea056 | ||
|   | 1c73980b09 | ||
|   | a3f5edc237 | ||
|   | 831ee695a5 | ||
|   | b9c8bfe442 | ||
|   | 0f20846208 | ||
|   | 862fc14188 | ||
|   | f77a0d297b | ||
|   | 50a4a3a126 | ||
|   | 56461b9eb0 | ||
|   | f85d12c3b2 | ||
|   | 98044e486f | ||
|   | edc49897ec | ||
|   | 68d96986b5 | ||
|   | ac8075791e | ||
|   | 0ff0597934 | ||
|   | 12681847c6 | ||
|   | 3238536a48 | ||
|   | 1a78ace131 | ||
|   | 1bc650b06c | 
							
								
								
									
										2
									
								
								.licenses/npm/@actions/cache.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								.licenses/npm/@actions/cache.dep.yml
									
									
									
										generated
									
									
									
								
							| @@ -1,6 +1,6 @@ | ||||
| --- | ||||
| name: "@actions/cache" | ||||
| version: 3.0.4 | ||||
| version: 3.0.5 | ||||
| type: npm | ||||
| summary: | ||||
| homepage: | ||||
|   | ||||
							
								
								
									
										2
									
								
								.licenses/npm/@actions/core.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								.licenses/npm/@actions/core.dep.yml
									
									
									
										generated
									
									
									
								
							| @@ -1,6 +1,6 @@ | ||||
| --- | ||||
| name: "@actions/core" | ||||
| version: 1.9.1 | ||||
| version: 1.10.0 | ||||
| type: npm | ||||
| summary: Actions core lib | ||||
| homepage: https://github.com/actions/toolkit/tree/main/packages/core | ||||
|   | ||||
| @@ -6,7 +6,7 @@ This action allows caching dependencies and build outputs to improve workflow ex | ||||
|  | ||||
| ## Documentation | ||||
|  | ||||
| See ["Caching dependencies to speed up workflows"](https://help.github.com/github/automating-your-workflow-with-github-actions/caching-dependencies-to-speed-up-workflows). | ||||
| See ["Caching dependencies to speed up workflows"](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows). | ||||
|  | ||||
| ## What's New | ||||
| ### v3 | ||||
| @@ -34,7 +34,7 @@ If you are using this inside a container, a POSIX-compliant `tar` needs to be in | ||||
|  | ||||
| * `path` - A list of files, directories, and wildcard patterns to cache and restore. See [`@actions/glob`](https://github.com/actions/toolkit/tree/main/packages/glob) for supported patterns. | ||||
| * `key` - An explicit key for restoring and saving the cache | ||||
| * `restore-keys` - An ordered list of keys to use for restoring stale cache if no cache hit occurred for key. Note | ||||
| * `restore-keys` - An ordered list of prefix-matched keys to use for restoring stale cache if no cache hit occurred for key. Note | ||||
| `cache-hit` returns false in this case. | ||||
|  | ||||
| #### Environment Variables | ||||
| @@ -80,7 +80,7 @@ jobs: | ||||
|       run: /primes.sh -d prime-numbers | ||||
| ``` | ||||
|  | ||||
| > Note: You must use the `cache` action in your workflow before you need to use the files that might be restored from the cache. If the provided `key` doesn't match an existing cache, a new cache is automatically created if the job completes successfully. | ||||
| > Note: You must use the `cache` action in your workflow before you need to use the files that might be restored from the cache. If the provided `key` matches an existing cache, a new cache is not created and if the provided `key` doesn't match an existing cache, a new cache is automatically created provided the job completes successfully. | ||||
|  | ||||
| ## Implementation Examples | ||||
|  | ||||
|   | ||||
							
								
								
									
										11
									
								
								RELEASES.md
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								RELEASES.md
									
									
									
									
									
								
							| @@ -29,3 +29,14 @@ | ||||
| ### 3.0.8 | ||||
| - 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). | ||||
| - Allowing users to provide a custom timeout as input for aborting download of a cache segment using an environment variable `SEGMENT_DOWNLOAD_TIMEOUT_MIN`. Default is 60 minutes. | ||||
|  | ||||
| ### 3.0.9 | ||||
| - Enhanced the warning message for cache unavailablity in case of GHES. | ||||
|  | ||||
| ### 3.0.10 | ||||
| - Fix a bug with sorting inputs. | ||||
| - Update definition for restore-keys in README.md | ||||
|  | ||||
| ### 3.0.11 | ||||
| - Update toolkit version to 3.0.5 to include `@actions/core@^1.10.0` | ||||
| - Update `@actions/cache` to use updated `saveState` and `setOutput` functions from `@actions/core@^1.10.0` | ||||
|   | ||||
| @@ -215,23 +215,6 @@ test("getInputAsArray handles empty lines correctly", () => { | ||||
|     expect(actionUtils.getInputAsArray("foo")).toEqual(["bar", "baz"]); | ||||
| }); | ||||
|  | ||||
| test("getInputAsArray sorts files correctly", () => { | ||||
|     testUtils.setInput( | ||||
|         "foo", | ||||
|         "bar\n!baz\nwaldo\nqux\nquux\ncorge\ngrault\ngarply" | ||||
|     ); | ||||
|     expect(actionUtils.getInputAsArray("foo")).toEqual([ | ||||
|         "!baz", | ||||
|         "bar", | ||||
|         "corge", | ||||
|         "garply", | ||||
|         "grault", | ||||
|         "quux", | ||||
|         "qux", | ||||
|         "waldo" | ||||
|     ]); | ||||
| }); | ||||
|  | ||||
| test("getInputAsArray removes spaces after ! at the beginning", () => { | ||||
|     testUtils.setInput( | ||||
|         "foo", | ||||
| @@ -240,11 +223,11 @@ test("getInputAsArray removes spaces after ! at the beginning", () => { | ||||
|     expect(actionUtils.getInputAsArray("foo")).toEqual([ | ||||
|         "!bar", | ||||
|         "!baz", | ||||
|         "!quux", | ||||
|         "!qux", | ||||
|         "!waldo", | ||||
|         "!quux", | ||||
|         "corge", | ||||
|         "grault! garply" | ||||
|         "grault! garply", | ||||
|         "!waldo" | ||||
|     ]); | ||||
| }); | ||||
|  | ||||
| @@ -277,8 +260,8 @@ test("isCacheFeatureAvailable for ac enabled", () => { | ||||
| test("isCacheFeatureAvailable for ac disabled on GHES", () => { | ||||
|     jest.spyOn(cache, "isFeatureAvailable").mockImplementation(() => false); | ||||
|  | ||||
|     const message = | ||||
|         "Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not."; | ||||
|     const message = `Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not. | ||||
| Otherwise please upgrade to GHES version >= 3.5 and If you are also using Github Connect, please unretire the actions/cache namespace before upgrade (see https://docs.github.com/en/enterprise-server@3.5/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect#automatic-retirement-of-namespaces-for-actions-accessed-on-githubcom)`; | ||||
|     const infoMock = jest.spyOn(core, "info"); | ||||
|  | ||||
|     try { | ||||
|   | ||||
| @@ -147,7 +147,7 @@ test("restore with no key", async () => { | ||||
| test("restore with too many keys should fail", async () => { | ||||
|     const path = "node_modules"; | ||||
|     const key = "node-test"; | ||||
|     const restoreKeys = [...Array(20).keys()].map(x => x.toString()).sort(); | ||||
|     const restoreKeys = [...Array(20).keys()].map(x => x.toString()); | ||||
|     testUtils.setInputs({ | ||||
|         path: path, | ||||
|         key, | ||||
|   | ||||
							
								
								
									
										59
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										59
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							| @@ -2954,13 +2954,14 @@ var __importStar = (this && this.__importStar) || function (mod) { | ||||
|     return result; | ||||
| }; | ||||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||||
| exports.issueCommand = void 0; | ||||
| exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; | ||||
| // We use any as a valid input type
 | ||||
| /* eslint-disable @typescript-eslint/no-explicit-any */ | ||||
| const fs = __importStar(__webpack_require__(747)); | ||||
| const os = __importStar(__webpack_require__(87)); | ||||
| const uuid_1 = __webpack_require__(25); | ||||
| const utils_1 = __webpack_require__(82); | ||||
| function issueCommand(command, message) { | ||||
| function issueFileCommand(command, message) { | ||||
|     const filePath = process.env[`GITHUB_${command}`]; | ||||
|     if (!filePath) { | ||||
|         throw new Error(`Unable to find environment variable for file command ${command}`); | ||||
| @@ -2972,7 +2973,22 @@ function issueCommand(command, message) { | ||||
|         encoding: 'utf8' | ||||
|     }); | ||||
| } | ||||
| exports.issueCommand = issueCommand; | ||||
| exports.issueFileCommand = issueFileCommand; | ||||
| function prepareKeyValueMessage(key, value) { | ||||
|     const delimiter = `ghadelimiter_${uuid_1.v4()}`; | ||||
|     const convertedValue = utils_1.toCommandValue(value); | ||||
|     // These should realistically never happen, but just in case someone finds a
 | ||||
|     // way to exploit uuid generation let's not allow keys or values that contain
 | ||||
|     // the delimiter.
 | ||||
|     if (key.includes(delimiter)) { | ||||
|         throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); | ||||
|     } | ||||
|     if (convertedValue.includes(delimiter)) { | ||||
|         throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); | ||||
|     } | ||||
|     return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; | ||||
| } | ||||
| exports.prepareKeyValueMessage = prepareKeyValueMessage; | ||||
| //# sourceMappingURL=file-command.js.map
 | ||||
| 
 | ||||
| /***/ }), | ||||
| @@ -38437,8 +38453,7 @@ function getInputAsArray(name, options) { | ||||
|         .getInput(name, options) | ||||
|         .split("\n") | ||||
|         .map(s => s.replace(/^!\s+/, "!").trim()) | ||||
|         .filter(x => x !== "") | ||||
|         .sort(); | ||||
|         .filter(x => x !== ""); | ||||
| } | ||||
| exports.getInputAsArray = getInputAsArray; | ||||
| function getInputAsInt(name, options) { | ||||
| @@ -38452,7 +38467,8 @@ exports.getInputAsInt = getInputAsInt; | ||||
| function isCacheFeatureAvailable() { | ||||
|     if (!cache.isFeatureAvailable()) { | ||||
|         if (isGhes()) { | ||||
|             logWarning("Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not."); | ||||
|             logWarning(`Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.
 | ||||
| Otherwise please upgrade to GHES version >= 3.5 and If you are also using Github Connect, please unretire the actions/cache namespace before upgrade (see https://docs.github.com/en/enterprise-server@3.5/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect#automatic-retirement-of-namespaces-for-actions-accessed-on-githubcom)`);
 | ||||
|         } | ||||
|         else { | ||||
|             logWarning("An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions."); | ||||
| @@ -40551,7 +40567,6 @@ const file_command_1 = __webpack_require__(102); | ||||
| const utils_1 = __webpack_require__(82); | ||||
| const os = __importStar(__webpack_require__(87)); | ||||
| const path = __importStar(__webpack_require__(622)); | ||||
| const uuid_1 = __webpack_require__(25); | ||||
| const oidc_utils_1 = __webpack_require__(742); | ||||
| /** | ||||
|  * The code to exit an action | ||||
| @@ -40581,21 +40596,10 @@ function exportVariable(name, val) { | ||||
|     process.env[name] = convertedVal; | ||||
|     const filePath = process.env['GITHUB_ENV'] || ''; | ||||
|     if (filePath) { | ||||
|         const delimiter = `ghadelimiter_${uuid_1.v4()}`; | ||||
|         // These should realistically never happen, but just in case someone finds a way to exploit uuid generation let's not allow keys or values that contain the delimiter.
 | ||||
|         if (name.includes(delimiter)) { | ||||
|             throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); | ||||
|         return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val)); | ||||
|     } | ||||
|         if (convertedVal.includes(delimiter)) { | ||||
|             throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); | ||||
|         } | ||||
|         const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`; | ||||
|         file_command_1.issueCommand('ENV', commandValue); | ||||
|     } | ||||
|     else { | ||||
|     command_1.issueCommand('set-env', { name }, convertedVal); | ||||
| } | ||||
| } | ||||
| exports.exportVariable = exportVariable; | ||||
| /** | ||||
|  * Registers a secret which will get masked from logs | ||||
| @@ -40612,7 +40616,7 @@ exports.setSecret = setSecret; | ||||
| function addPath(inputPath) { | ||||
|     const filePath = process.env['GITHUB_PATH'] || ''; | ||||
|     if (filePath) { | ||||
|         file_command_1.issueCommand('PATH', inputPath); | ||||
|         file_command_1.issueFileCommand('PATH', inputPath); | ||||
|     } | ||||
|     else { | ||||
|         command_1.issueCommand('add-path', {}, inputPath); | ||||
| @@ -40652,8 +40656,11 @@ function getMultilineInput(name, options) { | ||||
|     const inputs = getInput(name, options) | ||||
|         .split('\n') | ||||
|         .filter(x => x !== ''); | ||||
|     if (options && options.trimWhitespace === false) { | ||||
|         return inputs; | ||||
|     } | ||||
|     return inputs.map(input => input.trim()); | ||||
| } | ||||
| exports.getMultilineInput = getMultilineInput; | ||||
| /** | ||||
|  * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. | ||||
| @@ -40685,8 +40692,12 @@ exports.getBooleanInput = getBooleanInput; | ||||
|  */ | ||||
| // eslint-disable-next-line @typescript-eslint/no-explicit-any
 | ||||
| function setOutput(name, value) { | ||||
|     const filePath = process.env['GITHUB_OUTPUT'] || ''; | ||||
|     if (filePath) { | ||||
|         return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value)); | ||||
|     } | ||||
|     process.stdout.write(os.EOL); | ||||
|     command_1.issueCommand('set-output', { name }, value); | ||||
|     command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value)); | ||||
| } | ||||
| exports.setOutput = setOutput; | ||||
| /** | ||||
| @@ -40815,7 +40826,11 @@ exports.group = group; | ||||
|  */ | ||||
| // eslint-disable-next-line @typescript-eslint/no-explicit-any
 | ||||
| function saveState(name, value) { | ||||
|     command_1.issueCommand('save-state', { name }, value); | ||||
|     const filePath = process.env['GITHUB_STATE'] || ''; | ||||
|     if (filePath) { | ||||
|         return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value)); | ||||
|     } | ||||
|     command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value)); | ||||
| } | ||||
| exports.saveState = saveState; | ||||
| /** | ||||
|   | ||||
							
								
								
									
										59
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										59
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							| @@ -2954,13 +2954,14 @@ var __importStar = (this && this.__importStar) || function (mod) { | ||||
|     return result; | ||||
| }; | ||||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||||
| exports.issueCommand = void 0; | ||||
| exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; | ||||
| // We use any as a valid input type
 | ||||
| /* eslint-disable @typescript-eslint/no-explicit-any */ | ||||
| const fs = __importStar(__webpack_require__(747)); | ||||
| const os = __importStar(__webpack_require__(87)); | ||||
| const uuid_1 = __webpack_require__(25); | ||||
| const utils_1 = __webpack_require__(82); | ||||
| function issueCommand(command, message) { | ||||
| function issueFileCommand(command, message) { | ||||
|     const filePath = process.env[`GITHUB_${command}`]; | ||||
|     if (!filePath) { | ||||
|         throw new Error(`Unable to find environment variable for file command ${command}`); | ||||
| @@ -2972,7 +2973,22 @@ function issueCommand(command, message) { | ||||
|         encoding: 'utf8' | ||||
|     }); | ||||
| } | ||||
| exports.issueCommand = issueCommand; | ||||
| exports.issueFileCommand = issueFileCommand; | ||||
| function prepareKeyValueMessage(key, value) { | ||||
|     const delimiter = `ghadelimiter_${uuid_1.v4()}`; | ||||
|     const convertedValue = utils_1.toCommandValue(value); | ||||
|     // These should realistically never happen, but just in case someone finds a
 | ||||
|     // way to exploit uuid generation let's not allow keys or values that contain
 | ||||
|     // the delimiter.
 | ||||
|     if (key.includes(delimiter)) { | ||||
|         throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); | ||||
|     } | ||||
|     if (convertedValue.includes(delimiter)) { | ||||
|         throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); | ||||
|     } | ||||
|     return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; | ||||
| } | ||||
| exports.prepareKeyValueMessage = prepareKeyValueMessage; | ||||
| //# sourceMappingURL=file-command.js.map
 | ||||
| 
 | ||||
| /***/ }), | ||||
| @@ -38437,8 +38453,7 @@ function getInputAsArray(name, options) { | ||||
|         .getInput(name, options) | ||||
|         .split("\n") | ||||
|         .map(s => s.replace(/^!\s+/, "!").trim()) | ||||
|         .filter(x => x !== "") | ||||
|         .sort(); | ||||
|         .filter(x => x !== ""); | ||||
| } | ||||
| exports.getInputAsArray = getInputAsArray; | ||||
| function getInputAsInt(name, options) { | ||||
| @@ -38452,7 +38467,8 @@ exports.getInputAsInt = getInputAsInt; | ||||
| function isCacheFeatureAvailable() { | ||||
|     if (!cache.isFeatureAvailable()) { | ||||
|         if (isGhes()) { | ||||
|             logWarning("Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not."); | ||||
|             logWarning(`Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.
 | ||||
| Otherwise please upgrade to GHES version >= 3.5 and If you are also using Github Connect, please unretire the actions/cache namespace before upgrade (see https://docs.github.com/en/enterprise-server@3.5/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect#automatic-retirement-of-namespaces-for-actions-accessed-on-githubcom)`);
 | ||||
|         } | ||||
|         else { | ||||
|             logWarning("An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions."); | ||||
| @@ -40551,7 +40567,6 @@ const file_command_1 = __webpack_require__(102); | ||||
| const utils_1 = __webpack_require__(82); | ||||
| const os = __importStar(__webpack_require__(87)); | ||||
| const path = __importStar(__webpack_require__(622)); | ||||
| const uuid_1 = __webpack_require__(25); | ||||
| const oidc_utils_1 = __webpack_require__(742); | ||||
| /** | ||||
|  * The code to exit an action | ||||
| @@ -40581,21 +40596,10 @@ function exportVariable(name, val) { | ||||
|     process.env[name] = convertedVal; | ||||
|     const filePath = process.env['GITHUB_ENV'] || ''; | ||||
|     if (filePath) { | ||||
|         const delimiter = `ghadelimiter_${uuid_1.v4()}`; | ||||
|         // These should realistically never happen, but just in case someone finds a way to exploit uuid generation let's not allow keys or values that contain the delimiter.
 | ||||
|         if (name.includes(delimiter)) { | ||||
|             throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); | ||||
|         return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val)); | ||||
|     } | ||||
|         if (convertedVal.includes(delimiter)) { | ||||
|             throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); | ||||
|         } | ||||
|         const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`; | ||||
|         file_command_1.issueCommand('ENV', commandValue); | ||||
|     } | ||||
|     else { | ||||
|     command_1.issueCommand('set-env', { name }, convertedVal); | ||||
| } | ||||
| } | ||||
| exports.exportVariable = exportVariable; | ||||
| /** | ||||
|  * Registers a secret which will get masked from logs | ||||
| @@ -40612,7 +40616,7 @@ exports.setSecret = setSecret; | ||||
| function addPath(inputPath) { | ||||
|     const filePath = process.env['GITHUB_PATH'] || ''; | ||||
|     if (filePath) { | ||||
|         file_command_1.issueCommand('PATH', inputPath); | ||||
|         file_command_1.issueFileCommand('PATH', inputPath); | ||||
|     } | ||||
|     else { | ||||
|         command_1.issueCommand('add-path', {}, inputPath); | ||||
| @@ -40652,8 +40656,11 @@ function getMultilineInput(name, options) { | ||||
|     const inputs = getInput(name, options) | ||||
|         .split('\n') | ||||
|         .filter(x => x !== ''); | ||||
|     if (options && options.trimWhitespace === false) { | ||||
|         return inputs; | ||||
|     } | ||||
|     return inputs.map(input => input.trim()); | ||||
| } | ||||
| exports.getMultilineInput = getMultilineInput; | ||||
| /** | ||||
|  * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. | ||||
| @@ -40685,8 +40692,12 @@ exports.getBooleanInput = getBooleanInput; | ||||
|  */ | ||||
| // eslint-disable-next-line @typescript-eslint/no-explicit-any
 | ||||
| function setOutput(name, value) { | ||||
|     const filePath = process.env['GITHUB_OUTPUT'] || ''; | ||||
|     if (filePath) { | ||||
|         return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value)); | ||||
|     } | ||||
|     process.stdout.write(os.EOL); | ||||
|     command_1.issueCommand('set-output', { name }, value); | ||||
|     command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value)); | ||||
| } | ||||
| exports.setOutput = setOutput; | ||||
| /** | ||||
| @@ -40815,7 +40826,11 @@ exports.group = group; | ||||
|  */ | ||||
| // eslint-disable-next-line @typescript-eslint/no-explicit-any
 | ||||
| function saveState(name, value) { | ||||
|     command_1.issueCommand('save-state', { name }, value); | ||||
|     const filePath = process.env['GITHUB_STATE'] || ''; | ||||
|     if (filePath) { | ||||
|         return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value)); | ||||
|     } | ||||
|     command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value)); | ||||
| } | ||||
| exports.saveState = saveState; | ||||
| /** | ||||
|   | ||||
| @@ -332,7 +332,7 @@ If using `npm config` to retrieve the cache directory, ensure you run [actions/s | ||||
| - name: restore lerna | ||||
|   uses: actions/cache@v3 | ||||
|   with: | ||||
|     path: **/node_modules | ||||
|     path: '**/node_modules' | ||||
|     key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | ||||
| ``` | ||||
|  | ||||
|   | ||||
							
								
								
									
										36
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										36
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @@ -1,16 +1,16 @@ | ||||
| { | ||||
|   "name": "cache", | ||||
|   "version": "3.0.8", | ||||
|   "version": "3.0.11", | ||||
|   "lockfileVersion": 2, | ||||
|   "requires": true, | ||||
|   "packages": { | ||||
|     "": { | ||||
|       "name": "cache", | ||||
|       "version": "3.0.8", | ||||
|       "version": "3.0.11", | ||||
|       "license": "MIT", | ||||
|       "dependencies": { | ||||
|         "@actions/cache": "^3.0.4", | ||||
|         "@actions/core": "^1.9.1", | ||||
|         "@actions/cache": "^3.0.5", | ||||
|         "@actions/core": "^1.10.0", | ||||
|         "@actions/exec": "^1.1.1", | ||||
|         "@actions/io": "^1.1.2" | ||||
|       }, | ||||
| @@ -36,11 +36,11 @@ | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/@actions/cache": { | ||||
|       "version": "3.0.4", | ||||
|       "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-3.0.4.tgz", | ||||
|       "integrity": "sha512-9RwVL8/ISJoYWFNH1wR/C26E+M3HDkGPWmbFJMMCKwTkjbNZJreMT4XaR/EB1bheIvN4PREQxEQQVJ18IPnf/Q==", | ||||
|       "version": "3.0.5", | ||||
|       "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-3.0.5.tgz", | ||||
|       "integrity": "sha512-0WpPmwnRPkn5k5ASmjoX8bY8NrZEPTwN+64nGYJmR/bHjEVgC8svdf5K956wi67tNJBGJky2+UfvNbUOtHmMHg==", | ||||
|       "dependencies": { | ||||
|         "@actions/core": "^1.2.6", | ||||
|         "@actions/core": "^1.10.0", | ||||
|         "@actions/exec": "^1.0.1", | ||||
|         "@actions/glob": "^0.1.0", | ||||
|         "@actions/http-client": "^2.0.1", | ||||
| @@ -52,9 +52,9 @@ | ||||
|       } | ||||
|     }, | ||||
|     "node_modules/@actions/core": { | ||||
|       "version": "1.9.1", | ||||
|       "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.9.1.tgz", | ||||
|       "integrity": "sha512-5ad+U2YGrmmiw6du20AQW5XuWo7UKN2052FjSV7MX+Wfjf8sCqcsZe62NfgHys4QI4/Y+vQvLKYL8jWtA1ZBTA==", | ||||
|       "version": "1.10.0", | ||||
|       "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz", | ||||
|       "integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==", | ||||
|       "dependencies": { | ||||
|         "@actions/http-client": "^2.0.1", | ||||
|         "uuid": "^8.3.2" | ||||
| @@ -9534,11 +9534,11 @@ | ||||
|   }, | ||||
|   "dependencies": { | ||||
|     "@actions/cache": { | ||||
|       "version": "3.0.4", | ||||
|       "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-3.0.4.tgz", | ||||
|       "integrity": "sha512-9RwVL8/ISJoYWFNH1wR/C26E+M3HDkGPWmbFJMMCKwTkjbNZJreMT4XaR/EB1bheIvN4PREQxEQQVJ18IPnf/Q==", | ||||
|       "version": "3.0.5", | ||||
|       "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-3.0.5.tgz", | ||||
|       "integrity": "sha512-0WpPmwnRPkn5k5ASmjoX8bY8NrZEPTwN+64nGYJmR/bHjEVgC8svdf5K956wi67tNJBGJky2+UfvNbUOtHmMHg==", | ||||
|       "requires": { | ||||
|         "@actions/core": "^1.2.6", | ||||
|         "@actions/core": "^1.10.0", | ||||
|         "@actions/exec": "^1.0.1", | ||||
|         "@actions/glob": "^0.1.0", | ||||
|         "@actions/http-client": "^2.0.1", | ||||
| @@ -9550,9 +9550,9 @@ | ||||
|       } | ||||
|     }, | ||||
|     "@actions/core": { | ||||
|       "version": "1.9.1", | ||||
|       "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.9.1.tgz", | ||||
|       "integrity": "sha512-5ad+U2YGrmmiw6du20AQW5XuWo7UKN2052FjSV7MX+Wfjf8sCqcsZe62NfgHys4QI4/Y+vQvLKYL8jWtA1ZBTA==", | ||||
|       "version": "1.10.0", | ||||
|       "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz", | ||||
|       "integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==", | ||||
|       "requires": { | ||||
|         "@actions/http-client": "^2.0.1", | ||||
|         "uuid": "^8.3.2" | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| { | ||||
|   "name": "cache", | ||||
|   "version": "3.0.8", | ||||
|   "version": "3.0.11", | ||||
|   "private": true, | ||||
|   "description": "Cache dependencies and build outputs", | ||||
|   "main": "dist/restore/index.js", | ||||
| @@ -23,8 +23,8 @@ | ||||
|   "author": "GitHub", | ||||
|   "license": "MIT", | ||||
|   "dependencies": { | ||||
|     "@actions/cache": "^3.0.4", | ||||
|     "@actions/core": "^1.9.1", | ||||
|     "@actions/cache": "^3.0.5", | ||||
|     "@actions/core": "^1.10.0", | ||||
|     "@actions/exec": "^1.1.1", | ||||
|     "@actions/io": "^1.1.2" | ||||
|   }, | ||||
|   | ||||
| @@ -62,8 +62,7 @@ export function getInputAsArray( | ||||
|         .getInput(name, options) | ||||
|         .split("\n") | ||||
|         .map(s => s.replace(/^!\s+/, "!").trim()) | ||||
|         .filter(x => x !== "") | ||||
|         .sort(); | ||||
|         .filter(x => x !== ""); | ||||
| } | ||||
|  | ||||
| export function getInputAsInt( | ||||
| @@ -81,7 +80,8 @@ export function isCacheFeatureAvailable(): boolean { | ||||
|     if (!cache.isFeatureAvailable()) { | ||||
|         if (isGhes()) { | ||||
|             logWarning( | ||||
|                 "Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not." | ||||
|                 `Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not. | ||||
| Otherwise please upgrade to GHES version >= 3.5 and If you are also using Github Connect, please unretire the actions/cache namespace before upgrade (see https://docs.github.com/en/enterprise-server@3.5/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect#automatic-retirement-of-namespaces-for-actions-accessed-on-githubcom)` | ||||
|             ); | ||||
|         } else { | ||||
|             logWarning( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user