mirror of
				https://github.com/actions/cache.git
				synced 2025-10-31 15:26:24 +07:00 
			
		
		
		
	Compare commits
	
		
			4 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 47ad7e4077 | |||
| 64d30fb518 | |||
| 1a2d984507 | |||
| 7ca5bf5d35 | 
							
								
								
									
										6
									
								
								.licenses/npm/@actions/cache.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										6
									
								
								.licenses/npm/@actions/cache.dep.yml
									
									
									
										generated
									
									
									
								
							| @ -1,9 +1,9 @@ | ||||
| --- | ||||
| name: "@actions/cache" | ||||
| version: 1.0.10 | ||||
| version: 1.0.9 | ||||
| type: npm | ||||
| summary:  | ||||
| homepage:  | ||||
| summary: Actions cache lib | ||||
| homepage: https://github.com/actions/toolkit/tree/main/packages/cache | ||||
| license: mit | ||||
| licenses: | ||||
| - sources: LICENSE.md | ||||
|  | ||||
							
								
								
									
										6
									
								
								.licenses/npm/@actions/exec.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										6
									
								
								.licenses/npm/@actions/exec.dep.yml
									
									
									
										generated
									
									
									
								
							| @ -1,9 +1,9 @@ | ||||
| --- | ||||
| name: "@actions/exec" | ||||
| version: 1.1.1 | ||||
| version: 1.1.0 | ||||
| type: npm | ||||
| summary:  | ||||
| homepage:  | ||||
| summary: Actions exec lib | ||||
| homepage: https://github.com/actions/toolkit/tree/main/packages/exec | ||||
| license: mit | ||||
| licenses: | ||||
| - sources: LICENSE.md | ||||
|  | ||||
							
								
								
									
										6
									
								
								.licenses/npm/@actions/io.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										6
									
								
								.licenses/npm/@actions/io.dep.yml
									
									
									
										generated
									
									
									
								
							| @ -1,9 +1,9 @@ | ||||
| --- | ||||
| name: "@actions/io" | ||||
| version: 1.1.2 | ||||
| version: 1.1.1 | ||||
| type: npm | ||||
| summary:  | ||||
| homepage:  | ||||
| summary: Actions io lib | ||||
| homepage: https://github.com/actions/toolkit/tree/main/packages/io | ||||
| license: mit | ||||
| licenses: | ||||
| - sources: LICENSE.md | ||||
|  | ||||
| @ -1,9 +1,9 @@ | ||||
| --- | ||||
| name: "@azure/core-asynciterator-polyfill" | ||||
| version: 1.0.2 | ||||
| version: 1.0.0 | ||||
| type: npm | ||||
| summary:  | ||||
| homepage:  | ||||
| summary: Polyfill for IE/Node 8 for Symbol.asyncIterator | ||||
| homepage: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/core-asynciterator-polyfill | ||||
| license: mit | ||||
| licenses: | ||||
| - sources: LICENSE | ||||
|  | ||||
							
								
								
									
										7
									
								
								.licenses/npm/@azure/core-lro.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										7
									
								
								.licenses/npm/@azure/core-lro.dep.yml
									
									
									
										generated
									
									
									
								
							| @ -1,9 +1,10 @@ | ||||
| --- | ||||
| name: "@azure/core-lro" | ||||
| version: 2.2.4 | ||||
| version: 2.2.3 | ||||
| type: npm | ||||
| summary:  | ||||
| homepage:  | ||||
| summary: Isomorphic client library for supporting long-running operations in node.js | ||||
|   and browser. | ||||
| homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-lro/README.md | ||||
| license: mit | ||||
| licenses: | ||||
| - sources: LICENSE | ||||
|  | ||||
							
								
								
									
										7
									
								
								.licenses/npm/@azure/ms-rest-js.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										7
									
								
								.licenses/npm/@azure/ms-rest-js.dep.yml
									
									
									
										generated
									
									
									
								
							| @ -1,9 +1,10 @@ | ||||
| --- | ||||
| name: "@azure/ms-rest-js" | ||||
| version: 2.6.1 | ||||
| version: 2.6.0 | ||||
| type: npm | ||||
| summary:  | ||||
| homepage:  | ||||
| summary: Isomorphic client Runtime for Typescript/node.js/browser javascript client | ||||
|   libraries generated using AutoRest | ||||
| homepage: https://github.com/Azure/ms-rest-js | ||||
| license: mit | ||||
| licenses: | ||||
| - sources: LICENSE | ||||
|  | ||||
							
								
								
									
										6
									
								
								.licenses/npm/@azure/storage-blob.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										6
									
								
								.licenses/npm/@azure/storage-blob.dep.yml
									
									
									
										generated
									
									
									
								
							| @ -1,9 +1,9 @@ | ||||
| --- | ||||
| name: "@azure/storage-blob" | ||||
| version: 12.9.0 | ||||
| version: 12.8.0 | ||||
| type: npm | ||||
| summary:  | ||||
| homepage:  | ||||
| summary: Microsoft Azure Storage SDK for JavaScript - Blob | ||||
| homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/storage-blob/ | ||||
| license: mit | ||||
| licenses: | ||||
| - sources: LICENSE | ||||
|  | ||||
							
								
								
									
										6
									
								
								.licenses/npm/@opentelemetry/api.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										6
									
								
								.licenses/npm/@opentelemetry/api.dep.yml
									
									
									
										generated
									
									
									
								
							| @ -1,9 +1,9 @@ | ||||
| --- | ||||
| name: "@opentelemetry/api" | ||||
| version: 1.1.0 | ||||
| version: 1.0.4 | ||||
| type: npm | ||||
| summary:  | ||||
| homepage:  | ||||
| summary: Public API for OpenTelemetry | ||||
| homepage: https://github.com/open-telemetry/opentelemetry-js-api#readme | ||||
| license: apache-2.0 | ||||
| licenses: | ||||
| - sources: LICENSE | ||||
|  | ||||
							
								
								
									
										6
									
								
								.licenses/npm/@types/node-fetch.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										6
									
								
								.licenses/npm/@types/node-fetch.dep.yml
									
									
									
										generated
									
									
									
								
							| @ -1,9 +1,9 @@ | ||||
| --- | ||||
| name: "@types/node-fetch" | ||||
| version: 2.6.1 | ||||
| version: 2.5.12 | ||||
| type: npm | ||||
| summary:  | ||||
| homepage:  | ||||
| summary: TypeScript definitions for node-fetch | ||||
| homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-fetch | ||||
| license: mit | ||||
| licenses: | ||||
| - sources: LICENSE | ||||
|  | ||||
							
								
								
									
										6
									
								
								.licenses/npm/@types/node.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										6
									
								
								.licenses/npm/@types/node.dep.yml
									
									
									
										generated
									
									
									
								
							| @ -1,9 +1,9 @@ | ||||
| --- | ||||
| name: "@types/node" | ||||
| version: 16.11.26 | ||||
| version: 12.20.42 | ||||
| type: npm | ||||
| summary:  | ||||
| homepage:  | ||||
| summary: TypeScript definitions for Node.js | ||||
| homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node | ||||
| license: mit | ||||
| licenses: | ||||
| - sources: LICENSE | ||||
|  | ||||
							
								
								
									
										16
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								README.md
									
									
									
									
									
								
							| @ -2,7 +2,7 @@ | ||||
|  | ||||
| This action allows caching dependencies and build outputs to improve workflow execution time. | ||||
|  | ||||
| [](https://github.com/actions/cache/actions/workflows/workflow.yml) | ||||
| <a href="https://github.com/actions/cache/actions?query=workflow%3ATests"><img alt="GitHub Actions status" src="https://github.com/actions/cache/workflows/Tests/badge.svg?branch=main&event=push"></a> | ||||
|  | ||||
| ## Documentation | ||||
|  | ||||
| @ -10,7 +10,7 @@ See ["Caching dependencies to speed up workflows"](https://help.github.com/githu | ||||
|  | ||||
| ## What's New | ||||
|  | ||||
| * Added support for multiple paths, [glob patterns](https://github.com/actions/toolkit/tree/main/packages/glob), and single file caches. | ||||
| * Added support for multiple paths, [glob patterns](https://github.com/actions/toolkit/tree/main/packages/glob), and single file caches.  | ||||
|  | ||||
| ```yaml | ||||
| - name: Cache multiple paths | ||||
| @ -38,7 +38,7 @@ If you are using this inside a container, a POSIX-compliant `tar` needs to be in | ||||
|  | ||||
| ### Inputs | ||||
|  | ||||
| * `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. | ||||
| * `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 the cache if no cache hit occurred for key | ||||
|  | ||||
| @ -49,7 +49,7 @@ If you are using this inside a container, a POSIX-compliant `tar` needs to be in | ||||
| > See [Skipping steps based on cache-hit](#Skipping-steps-based-on-cache-hit) for info on using this output | ||||
|  | ||||
| ### Cache scopes | ||||
| The cache is scoped to the key and branch. The default branch cache is available to other branches. | ||||
| The cache is scoped to the key and branch. The default branch cache is available to other branches.  | ||||
|  | ||||
| See [Matching a cache key](https://help.github.com/en/actions/configuring-and-managing-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key) for more info. | ||||
|  | ||||
| @ -88,13 +88,11 @@ Every programming language and framework has its own way of caching. | ||||
|  | ||||
| See [Examples](examples.md) for a list of `actions/cache` implementations for use with: | ||||
|  | ||||
| - [C# - NuGet](./examples.md#c---nuget) | ||||
| - [C# - Nuget](./examples.md#c---nuget) | ||||
| - [D - DUB](./examples.md#d---dub) | ||||
| - [Deno](./examples.md#deno) | ||||
| - [Elixir - Mix](./examples.md#elixir---mix) | ||||
| - [Go - Modules](./examples.md#go---modules) | ||||
| - [Haskell - Cabal](./examples.md#haskell---cabal) | ||||
| - [Haskell - Stack](./examples.md#haskell---stack) | ||||
| - [Java - Gradle](./examples.md#java---gradle) | ||||
| - [Java - Maven](./examples.md#java---maven) | ||||
| - [Node - npm](./examples.md#node---npm) | ||||
| @ -121,9 +119,9 @@ For example, using the [`hashFiles`](https://help.github.com/en/actions/referenc | ||||
| ```yaml | ||||
|   - uses: actions/cache@v2 | ||||
|     with: | ||||
|       path: | | ||||
|       path: |  | ||||
|         path/to/dependencies | ||||
|         some/other/dependencies | ||||
|         some/other/dependencies  | ||||
|       key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -18,7 +18,7 @@ outputs: | ||||
|   cache-hit: | ||||
|     description: 'A boolean value to indicate an exact match was found for the primary key' | ||||
| runs: | ||||
|   using: 'node16' | ||||
|   using: 'node12' | ||||
|   main: 'dist/restore/index.js' | ||||
|   post: 'dist/save/index.js' | ||||
|   post-if: 'success()' | ||||
|  | ||||
							
								
								
									
										
											BIN
										
									
								
								actions-cache-1.0.9.tgz
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								actions-cache-1.0.9.tgz
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										2435
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2435
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										2435
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2435
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										77
									
								
								examples.md
									
									
									
									
									
								
							
							
						
						
									
										77
									
								
								examples.md
									
									
									
									
									
								
							| @ -4,22 +4,17 @@ | ||||
| - [D - DUB](#d---dub) | ||||
|   - [POSIX](#posix) | ||||
|   - [Windows](#windows) | ||||
| - [Deno](#deno) | ||||
| - [Elixir - Mix](#elixir---mix) | ||||
| - [Go - Modules](#go---modules) | ||||
|   - [Linux](#linux) | ||||
|   - [macOS](#macos) | ||||
|   - [Windows](#windows-1) | ||||
| - [Elixir - Mix](#elixir---mix) | ||||
| - [Go - Modules](#go---modules) | ||||
|   - [Linux](#linux-1) | ||||
|   - [macOS](#macos-1) | ||||
|   - [Windows](#windows-2) | ||||
| - [Haskell - Cabal](#haskell---cabal) | ||||
| - [Haskell - Stack](#haskell---stack) | ||||
| - [Java - Gradle](#java---gradle) | ||||
| - [Java - Maven](#java---maven) | ||||
| - [Node - npm](#node---npm) | ||||
|   - [macOS and Ubuntu](#macos-and-ubuntu) | ||||
|   - [Windows](#windows-3) | ||||
|   - [Windows](#windows-2) | ||||
|   - [Using multiple systems and `npm config`](#using-multiple-systems-and-npm-config) | ||||
| - [Node - Lerna](#node---lerna) | ||||
| - [Node - Yarn](#node---yarn) | ||||
| @ -33,6 +28,8 @@ | ||||
|   - [Using pip to get cache location](#using-pip-to-get-cache-location) | ||||
| - [Python - pipenv](#python---pipenv) | ||||
| - [R - renv](#r---renv) | ||||
|   - [Simple example](#simple-example-1) | ||||
|   - [Multiple OS's in a workflow](#multiple-oss-in-a-workflow-1) | ||||
| - [Ruby - Bundler](#ruby---bundler) | ||||
| - [Rust - Cargo](#rust---cargo) | ||||
| - [Scala - SBT](#scala---sbt) | ||||
| @ -69,7 +66,6 @@ With `actions/cache@v2` you can now exclude unwanted packages with [exclude patt | ||||
|  | ||||
| Or you could move the cache folder like below. | ||||
| >Note: This workflow does not work for projects that require files to be placed in user profile package folder | ||||
|  | ||||
| ```yaml | ||||
| env: | ||||
|   NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages | ||||
| @ -106,42 +102,6 @@ steps: | ||||
|       ${{ runner.os }}-dub- | ||||
| ``` | ||||
|  | ||||
| ## Deno | ||||
|  | ||||
| ### Linux | ||||
|  | ||||
| ```yaml | ||||
| - uses: actions/cache@v2 | ||||
|   with: | ||||
|     path: | | ||||
|       ~/.deno | ||||
|       ~/.cache/deno | ||||
|     key: ${{ runner.os }}-deno-${{ hashFiles('**/deps.ts') }} | ||||
| ``` | ||||
|  | ||||
| ### macOS | ||||
|  | ||||
| ```yaml | ||||
| - uses: actions/cache@v2 | ||||
|   with: | ||||
|     path: | | ||||
|       ~/.deno | ||||
|       ~/Library/Caches/deno | ||||
|     key: ${{ runner.os }}-deno-${{ hashFiles('**/deps.ts') }} | ||||
| ``` | ||||
|  | ||||
| ### Windows | ||||
|  | ||||
| ```yaml | ||||
| - uses: actions/cache@v2 | ||||
|   with: | ||||
|     path: | | ||||
|       ~\.deno | ||||
|       %LocalAppData%\deno | ||||
|     key: ${{ runner.os }}-deno-${{ hashFiles('**/deps.ts') }} | ||||
| ``` | ||||
|  | ||||
|  | ||||
| ## Elixir - Mix | ||||
|  | ||||
| ```yaml | ||||
| @ -189,8 +149,8 @@ steps: | ||||
| - uses: actions/cache@v2 | ||||
|   with: | ||||
|     path: | | ||||
|       ~\AppData\Local\go-build | ||||
|       ~\go\pkg\mod | ||||
|       %LocalAppData%\go-build | ||||
|       ~/go/pkg/mod | ||||
|     key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||||
|     restore-keys: | | ||||
|       ${{ runner.os }}-go- | ||||
| @ -212,25 +172,6 @@ We cache the elements of the Cabal store separately, as the entirety of `~/.caba | ||||
|     restore-keys: ${{ runner.os }}-${{ matrix.ghc }}- | ||||
| ``` | ||||
|  | ||||
| ## Haskell - Stack | ||||
|  | ||||
| ```yaml | ||||
| - uses: actions/cache@v2 | ||||
|   name: Cache ~/.stack | ||||
|   with: | ||||
|     path: ~/.stack | ||||
|     key: ${{ runner.os }}-stack-global-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }} | ||||
|     restore-keys: | | ||||
|       ${{ runner.os }}-stack-global- | ||||
| - uses: actions/cache@v2 | ||||
|   name: Cache .stack-work | ||||
|   with: | ||||
|     path: .stack-work | ||||
|     key: ${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }}-${{ hashFiles('**/*.hs') }} | ||||
|     restore-keys: | | ||||
|       ${{ runner.os }}-stack-work- | ||||
| ``` | ||||
|  | ||||
| ## Java - Gradle | ||||
|  | ||||
| >Note: Ensure no Gradle daemons are running anymore when your workflow completes. Creating the cache package might fail due to locks being held by Gradle. Refer to the [Gradle Daemon documentation](https://docs.gradle.org/current/userguide/gradle_daemon.html) on how to disable or stop the Gradle Daemons. | ||||
| @ -314,7 +255,9 @@ If using `npm config` to retrieve the cache directory, ensure you run [actions/s | ||||
| - name: restore lerna | ||||
|   uses: actions/cache@v2 | ||||
|   with: | ||||
|     path: **/node_modules | ||||
|     path: | | ||||
|       node_modules | ||||
|       */*/node_modules | ||||
|     key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | ||||
| ``` | ||||
|  | ||||
|  | ||||
							
								
								
									
										4384
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4384
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										28
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										28
									
								
								package.json
									
									
									
									
									
								
							| @ -1,6 +1,6 @@ | ||||
| { | ||||
|   "name": "cache", | ||||
|   "version": "3.0.0", | ||||
|   "version": "2.1.7", | ||||
|   "private": true, | ||||
|   "description": "Cache dependencies and build outputs", | ||||
|   "main": "dist/restore/index.js", | ||||
| @ -23,28 +23,28 @@ | ||||
|   "author": "GitHub", | ||||
|   "license": "MIT", | ||||
|   "dependencies": { | ||||
|     "@actions/cache": "^1.0.10", | ||||
|     "@actions/cache": "file:actions-cache-1.0.9.tgz", | ||||
|     "@actions/core": "^1.2.6", | ||||
|     "@actions/exec": "^1.1.1", | ||||
|     "@actions/io": "^1.1.2" | ||||
|     "@actions/exec": "^1.0.1", | ||||
|     "@actions/io": "^1.1.0" | ||||
|   }, | ||||
|   "devDependencies": { | ||||
|     "@types/jest": "^27.4.1", | ||||
|     "@types/jest": "^27.4.0", | ||||
|     "@types/nock": "^11.1.0", | ||||
|     "@types/node": "^16.11.26", | ||||
|     "@typescript-eslint/eslint-plugin": "^5.15.0", | ||||
|     "@typescript-eslint/parser": "^5.15.0", | ||||
|     "@types/node": "^12.20.42", | ||||
|     "@typescript-eslint/eslint-plugin": "^5.10.1", | ||||
|     "@typescript-eslint/parser": "^5.10.1", | ||||
|     "@zeit/ncc": "^0.20.5", | ||||
|     "eslint": "^8.11.0", | ||||
|     "eslint-config-prettier": "^8.5.0", | ||||
|     "eslint": "^8.8.0", | ||||
|     "eslint-config-prettier": "^8.3.0", | ||||
|     "eslint-plugin-import": "^2.25.4", | ||||
|     "eslint-plugin-jest": "^26.1.2", | ||||
|     "eslint-plugin-jest": "^26.0.0", | ||||
|     "eslint-plugin-prettier": "^4.0.0", | ||||
|     "eslint-plugin-simple-import-sort": "^7.0.0", | ||||
|     "jest": "^27.5.1", | ||||
|     "jest-circus": "^27.5.1", | ||||
|     "jest": "^27.4.7", | ||||
|     "jest-circus": "^27.4.6", | ||||
|     "nock": "^11.7.0", | ||||
|     "prettier": "^2.6.0", | ||||
|     "prettier": "^2.5.1", | ||||
|     "ts-jest": "^27.1.3", | ||||
|     "typescript": "^3.9.9" | ||||
|   } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	