mirror of
				https://gitea.com/actions/cache.git
				synced 2025-10-29 07:47:12 +00:00 
			
		
		
		
	Compare commits
	
		
			2 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 2b250bc32a | ||
|   | 8492260343 | 
| @@ -9,14 +9,15 @@ | ||||
|     "plugin:import/errors", | ||||
|     "plugin:import/warnings", | ||||
|     "plugin:import/typescript", | ||||
|     "plugin:prettier/recommended" | ||||
|     "plugin:prettier/recommended", | ||||
|     "prettier/@typescript-eslint" | ||||
|   ], | ||||
|   "plugins": ["@typescript-eslint", "simple-import-sort", "jest"], | ||||
|   "rules": { | ||||
|     "import/first": "error", | ||||
|     "import/newline-after-import": "error", | ||||
|     "import/no-duplicates": "error", | ||||
|     "simple-import-sort/imports": "error", | ||||
|     "simple-import-sort/sort": "error", | ||||
|     "sort-imports": "off" | ||||
|   } | ||||
| } | ||||
|   | ||||
							
								
								
									
										3
									
								
								.gitattributes
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitattributes
									
									
									
									
										vendored
									
									
								
							| @@ -1,2 +1 @@ | ||||
| .licenses/** -diff linguist-generated=true | ||||
| * text=auto eol=lf | ||||
| .licenses/** -diff linguist-generated=true | ||||
							
								
								
									
										2
									
								
								.github/CODEOWNERS
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/CODEOWNERS
									
									
									
									
										vendored
									
									
								
							| @@ -1 +1 @@ | ||||
| * @actions/actions-cache | ||||
| * @actions/artifacts-actions | ||||
|   | ||||
							
								
								
									
										22
									
								
								.github/workflows/close-inactive-issues.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										22
									
								
								.github/workflows/close-inactive-issues.yml
									
									
									
									
										vendored
									
									
								
							| @@ -1,22 +0,0 @@ | ||||
| name: Close inactive issues | ||||
| on: | ||||
|   schedule: | ||||
|     - cron: "30 8 * * *" | ||||
|  | ||||
| jobs: | ||||
|   close-issues: | ||||
|     runs-on: ubuntu-latest | ||||
|     permissions: | ||||
|       issues: write | ||||
|       pull-requests: write | ||||
|     steps: | ||||
|       - uses: actions/stale@v3 | ||||
|         with: | ||||
|           days-before-issue-stale: 365 | ||||
|           days-before-issue-close: 5 | ||||
|           stale-issue-label: "stale" | ||||
|           stale-issue-message: "This issue is stale because it has been open for 365 days with no activity. Leave a comment to avoid closing this issue in 5 days." | ||||
|           close-issue-message: "This issue was closed because it has been inactive for 5 days since being marked as stale." | ||||
|           days-before-pr-stale: -1 | ||||
|           days-before-pr-close: -1 | ||||
|           repo-token: ${{ secrets.GITHUB_TOKEN }} | ||||
							
								
								
									
										2
									
								
								.licenses/npm/@actions/cache.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								.licenses/npm/@actions/cache.dep.yml
									
									
									
										generated
									
									
									
								
							| @@ -1,6 +1,6 @@ | ||||
| --- | ||||
| name: "@actions/cache" | ||||
| version: 1.0.9 | ||||
| version: 1.0.8 | ||||
| type: npm | ||||
| summary: Actions cache lib | ||||
| homepage: https://github.com/actions/toolkit/tree/main/packages/cache | ||||
|   | ||||
							
								
								
									
										2
									
								
								.licenses/npm/@azure/core-http.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								.licenses/npm/@azure/core-http.dep.yml
									
									
									
										generated
									
									
									
								
							| @@ -1,6 +1,6 @@ | ||||
| --- | ||||
| name: "@azure/core-http" | ||||
| version: 2.2.4 | ||||
| version: 2.2.2 | ||||
| type: npm | ||||
| summary: Isomorphic client Runtime for Typescript/node.js/browser javascript client | ||||
|   libraries generated using AutoRest | ||||
|   | ||||
							
								
								
									
										2
									
								
								.licenses/npm/@azure/core-lro.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								.licenses/npm/@azure/core-lro.dep.yml
									
									
									
										generated
									
									
									
								
							| @@ -1,6 +1,6 @@ | ||||
| --- | ||||
| name: "@azure/core-lro" | ||||
| version: 2.2.3 | ||||
| version: 2.2.1 | ||||
| type: npm | ||||
| summary: Isomorphic client library for supporting long-running operations in node.js | ||||
|   and browser. | ||||
|   | ||||
							
								
								
									
										2
									
								
								.licenses/npm/@azure/core-paging.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								.licenses/npm/@azure/core-paging.dep.yml
									
									
									
										generated
									
									
									
								
							| @@ -1,6 +1,6 @@ | ||||
| --- | ||||
| name: "@azure/core-paging" | ||||
| version: 1.2.1 | ||||
| version: 1.2.0 | ||||
| type: npm | ||||
| summary: Core types for paging async iterable iterators | ||||
| homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/core-paging/README.md | ||||
|   | ||||
							
								
								
									
										6
									
								
								.licenses/npm/@opentelemetry/api.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										6
									
								
								.licenses/npm/@opentelemetry/api.dep.yml
									
									
									
										generated
									
									
									
								
							| @@ -1,6 +1,6 @@ | ||||
| --- | ||||
| name: "@opentelemetry/api" | ||||
| version: 1.0.4 | ||||
| version: 1.0.3 | ||||
| type: npm | ||||
| summary: Public API for OpenTelemetry | ||||
| homepage: https://github.com/open-telemetry/opentelemetry-js-api#readme | ||||
| @@ -218,6 +218,10 @@ licenses: | ||||
|     [discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions | ||||
|     [license-url]: https://github.com/open-telemetry/opentelemetry-js-api/blob/main/LICENSE | ||||
|     [license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat | ||||
|     [dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js-api.svg | ||||
|     [dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js-api | ||||
|     [devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js-api.svg?type=dev | ||||
|     [devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js-api?type=dev | ||||
|     [npm-url]: https://www.npmjs.com/package/@opentelemetry/api | ||||
|     [npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fapi.svg | ||||
|     [docs-tracing]: https://github.com/open-telemetry/opentelemetry-js-api/blob/main/docs/tracing.md | ||||
|   | ||||
							
								
								
									
										2
									
								
								.licenses/npm/@types/node.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								.licenses/npm/@types/node.dep.yml
									
									
									
										generated
									
									
									
								
							| @@ -1,6 +1,6 @@ | ||||
| --- | ||||
| name: "@types/node" | ||||
| version: 12.20.42 | ||||
| version: 12.20.37 | ||||
| type: npm | ||||
| summary: TypeScript definitions for Node.js | ||||
| homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node | ||||
|   | ||||
							
								
								
									
										2
									
								
								.licenses/npm/node-fetch.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								.licenses/npm/node-fetch.dep.yml
									
									
									
										generated
									
									
									
								
							| @@ -1,6 +1,6 @@ | ||||
| --- | ||||
| name: node-fetch | ||||
| version: 2.6.7 | ||||
| version: 2.6.6 | ||||
| type: npm | ||||
| summary: A light-weight module that brings window.fetch to node.js | ||||
| homepage: https://github.com/bitinn/node-fetch | ||||
|   | ||||
							
								
								
									
										10
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								README.md
									
									
									
									
									
								
							| @@ -34,8 +34,6 @@ Refer [here](https://github.com/actions/cache/blob/v1/README.md) for previous ve | ||||
| ### Pre-requisites | ||||
| Create a workflow `.yml` file in your repositories `.github/workflows` directory. An [example workflow](#example-workflow) is available below. For more information, reference the GitHub Help Documentation for [Creating a workflow file](https://help.github.com/en/articles/configuring-a-workflow#creating-a-workflow-file). | ||||
|  | ||||
| If you are using this inside a container, a POSIX-compliant `tar` needs to be included and accessible in the execution path. | ||||
|  | ||||
| ### 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.  | ||||
| @@ -145,7 +143,7 @@ See [Using contexts to create cache keys](https://help.github.com/en/actions/con | ||||
|  | ||||
| ## Cache Limits | ||||
|  | ||||
| A repository can have up to 10GB of caches. Once the 10GB limit is reached, older caches will be evicted based on when the cache was last accessed.  Caches that are not accessed within the last week will also be evicted. | ||||
| A repository can have up to 5GB of caches. Once the 5GB limit is reached, older caches will be evicted based on when the cache was last accessed.  Caches that are not accessed within the last week will also be evicted. | ||||
|  | ||||
| ## Skipping steps based on cache-hit | ||||
|  | ||||
| @@ -169,12 +167,6 @@ steps: | ||||
|  | ||||
| > Note: The `id` defined in `actions/cache` must match the `id` in the `if` statement (i.e. `steps.[ID].outputs.cache-hit`) | ||||
|  | ||||
| ## Known limitation | ||||
|  | ||||
| - `action/cache` is currently not supported on GitHub Enterprise Server. <https://github.com/github/roadmap/issues/273> is tracking this. | ||||
|  | ||||
| Since GitHub Enterprise Server uses self-hosted runners, dependencies are typically cached on the runner by whatever dependency management tool is being used (npm, maven, etc.).  This eliminates the need for explicit caching in some scenarios. | ||||
|  | ||||
| ## Contributing | ||||
| We would love for you to contribute to `actions/cache`, pull requests are welcome! Please see the [CONTRIBUTING.md](CONTRIBUTING.md) for more information. | ||||
|  | ||||
|   | ||||
| @@ -26,7 +26,7 @@ test("isGhes returns true if server url is not github.com", () => { | ||||
|     } | ||||
| }); | ||||
|  | ||||
| test("isGhes returns false when server url is github.com", () => { | ||||
| test("isGhes returns true when server url is github.com", () => { | ||||
|     try { | ||||
|         process.env["GITHUB_SERVER_URL"] = "http://github.com"; | ||||
|         expect(actionUtils.isGhes()).toBe(false); | ||||
|   | ||||
							
								
								
									
										4749
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4749
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										4749
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4749
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -168,8 +168,7 @@ We cache the elements of the Cabal store separately, as the entirety of `~/.caba | ||||
|       ~/.cabal/packages | ||||
|       ~/.cabal/store | ||||
|       dist-newstyle | ||||
|     key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('**/*.cabal', '**/cabal.project', '**/cabal.project.freeze') }} | ||||
|     restore-keys: ${{ runner.os }}-${{ matrix.ghc }}- | ||||
|     key: ${{ runner.os }}-${{ matrix.ghc }} | ||||
| ``` | ||||
|  | ||||
| ## Java - Gradle | ||||
|   | ||||
| @@ -17,7 +17,7 @@ const processStdoutWrite = process.stdout.write.bind(process.stdout); | ||||
| process.stdout.write = (str, encoding, cb) => { | ||||
|     // Core library will directly call process.stdout.write for commands | ||||
|     // We don't want :: commands to be executed by the runner during tests | ||||
|     if (!String(str).match(/^::/)) { | ||||
|     if (!str.match(/^::/)) { | ||||
|         return processStdoutWrite(str, encoding, cb); | ||||
|     } | ||||
| }; | ||||
|   | ||||
							
								
								
									
										8765
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										8765
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										34
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										34
									
								
								package.json
									
									
									
									
									
								
							| @@ -1,6 +1,6 @@ | ||||
| { | ||||
|   "name": "cache", | ||||
|   "version": "2.1.7", | ||||
|   "version": "2.1.8", | ||||
|   "private": true, | ||||
|   "description": "Cache dependencies and build outputs", | ||||
|   "main": "dist/restore/index.js", | ||||
| @@ -23,29 +23,29 @@ | ||||
|   "author": "GitHub", | ||||
|   "license": "MIT", | ||||
|   "dependencies": { | ||||
|     "@actions/cache": "^1.0.9", | ||||
|     "@actions/core": "^1.2.6", | ||||
|     "@actions/cache": "^1.0.8", | ||||
|     "@actions/core": "^1.10.0", | ||||
|     "@actions/exec": "^1.0.1", | ||||
|     "@actions/io": "^1.1.0" | ||||
|   }, | ||||
|   "devDependencies": { | ||||
|     "@types/jest": "^27.4.0", | ||||
|     "@types/jest": "^24.0.13", | ||||
|     "@types/nock": "^11.1.0", | ||||
|     "@types/node": "^12.20.42", | ||||
|     "@typescript-eslint/eslint-plugin": "^5.10.1", | ||||
|     "@typescript-eslint/parser": "^5.10.1", | ||||
|     "@types/node": "^12.20.7", | ||||
|     "@typescript-eslint/eslint-plugin": "^2.7.0", | ||||
|     "@typescript-eslint/parser": "^2.7.0", | ||||
|     "@zeit/ncc": "^0.20.5", | ||||
|     "eslint": "^8.8.0", | ||||
|     "eslint-config-prettier": "^8.3.0", | ||||
|     "eslint-plugin-import": "^2.25.4", | ||||
|     "eslint-plugin-jest": "^26.0.0", | ||||
|     "eslint-plugin-prettier": "^4.0.0", | ||||
|     "eslint-plugin-simple-import-sort": "^7.0.0", | ||||
|     "jest": "^27.4.7", | ||||
|     "jest-circus": "^27.4.6", | ||||
|     "eslint": "^6.6.0", | ||||
|     "eslint-config-prettier": "^6.15.0", | ||||
|     "eslint-plugin-import": "^2.22.1", | ||||
|     "eslint-plugin-jest": "^23.20.0", | ||||
|     "eslint-plugin-prettier": "^3.3.1", | ||||
|     "eslint-plugin-simple-import-sort": "^5.0.2", | ||||
|     "jest": "^24.8.0", | ||||
|     "jest-circus": "^24.7.1", | ||||
|     "nock": "^11.7.0", | ||||
|     "prettier": "^2.5.1", | ||||
|     "ts-jest": "^27.1.3", | ||||
|     "prettier": "^1.19.1", | ||||
|     "ts-jest": "^26.5.4", | ||||
|     "typescript": "^3.9.9" | ||||
|   } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user