mirror of
				https://gitea.com/actions/cache.git
				synced 2025-10-31 07:47:07 +00:00 
			
		
		
		
	Compare commits
	
		
			13 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 90c49f2166 | ||
|   | d0f267fa32 | ||
|   | 611465405c | ||
|   | c64c5261d3 | ||
|   | 4e8aa1cc93 | ||
|   | f7a7367bb2 | ||
|   | 3bb5ffcc9c | ||
|   | e6890046a6 | ||
|   | 62fa565f30 | ||
|   | e882008267 | ||
|   | 8e0501dcaf | ||
|   | a3b6799c91 | ||
|   | bd49291365 | 
							
								
								
									
										2
									
								
								.github/CODEOWNERS
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/CODEOWNERS
									
									
									
									
										vendored
									
									
								
							| @@ -1 +1 @@ | ||||
| * @actions/artifacts-actions | ||||
| * @actions/actions-cache | ||||
|   | ||||
							
								
								
									
										22
									
								
								.github/workflows/close-inactive-issues.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								.github/workflows/close-inactive-issues.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,22 @@ | ||||
| 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 }} | ||||
| @@ -143,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 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. | ||||
| 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. | ||||
|  | ||||
| ## Skipping steps based on cache-hit | ||||
|  | ||||
| @@ -167,6 +167,12 @@ 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. | ||||
|  | ||||
|   | ||||
							
								
								
									
										30
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										30
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							| @@ -37903,9 +37903,17 @@ AbortError.prototype = Object.create(Error.prototype); | ||||
| AbortError.prototype.constructor = AbortError; | ||||
| AbortError.prototype.name = 'AbortError'; | ||||
| 
 | ||||
| const URL$1 = Url.URL || whatwgUrl.URL; | ||||
| 
 | ||||
| // fix an issue where "PassThrough", "resolve" aren't a named export for node <10
 | ||||
| const PassThrough$1 = Stream.PassThrough; | ||||
| const resolve_url = Url.resolve; | ||||
| 
 | ||||
| const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) { | ||||
| 	const orig = new URL$1(original).hostname; | ||||
| 	const dest = new URL$1(destination).hostname; | ||||
| 
 | ||||
| 	return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest); | ||||
| }; | ||||
| 
 | ||||
| /** | ||||
|  * Fetch function | ||||
| @@ -37993,7 +38001,19 @@ function fetch(url, opts) { | ||||
| 				const location = headers.get('Location'); | ||||
| 
 | ||||
| 				// HTTP fetch step 5.3
 | ||||
| 				const locationURL = location === null ? null : resolve_url(request.url, location); | ||||
| 				let locationURL = null; | ||||
| 				try { | ||||
| 					locationURL = location === null ? null : new URL$1(location, request.url).toString(); | ||||
| 				} catch (err) { | ||||
| 					// error here can only be invalid URL in Location: header
 | ||||
| 					// do not throw when options.redirect == manual
 | ||||
| 					// let the user extract the errorneous redirect URL
 | ||||
| 					if (request.redirect !== 'manual') { | ||||
| 						reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect')); | ||||
| 						finalize(); | ||||
| 						return; | ||||
| 					} | ||||
| 				} | ||||
| 
 | ||||
| 				// HTTP fetch step 5.5
 | ||||
| 				switch (request.redirect) { | ||||
| @@ -38041,6 +38061,12 @@ function fetch(url, opts) { | ||||
| 							size: request.size | ||||
| 						}; | ||||
| 
 | ||||
| 						if (!isDomainOrSubdomain(request.url, locationURL)) { | ||||
| 							for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) { | ||||
| 								requestOpts.headers.delete(name); | ||||
| 							} | ||||
| 						} | ||||
| 
 | ||||
| 						// HTTP-redirect fetch step 9
 | ||||
| 						if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { | ||||
| 							reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); | ||||
|   | ||||
							
								
								
									
										30
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										30
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							| @@ -37903,9 +37903,17 @@ AbortError.prototype = Object.create(Error.prototype); | ||||
| AbortError.prototype.constructor = AbortError; | ||||
| AbortError.prototype.name = 'AbortError'; | ||||
| 
 | ||||
| const URL$1 = Url.URL || whatwgUrl.URL; | ||||
| 
 | ||||
| // fix an issue where "PassThrough", "resolve" aren't a named export for node <10
 | ||||
| const PassThrough$1 = Stream.PassThrough; | ||||
| const resolve_url = Url.resolve; | ||||
| 
 | ||||
| const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) { | ||||
| 	const orig = new URL$1(original).hostname; | ||||
| 	const dest = new URL$1(destination).hostname; | ||||
| 
 | ||||
| 	return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest); | ||||
| }; | ||||
| 
 | ||||
| /** | ||||
|  * Fetch function | ||||
| @@ -37993,7 +38001,19 @@ function fetch(url, opts) { | ||||
| 				const location = headers.get('Location'); | ||||
| 
 | ||||
| 				// HTTP fetch step 5.3
 | ||||
| 				const locationURL = location === null ? null : resolve_url(request.url, location); | ||||
| 				let locationURL = null; | ||||
| 				try { | ||||
| 					locationURL = location === null ? null : new URL$1(location, request.url).toString(); | ||||
| 				} catch (err) { | ||||
| 					// error here can only be invalid URL in Location: header
 | ||||
| 					// do not throw when options.redirect == manual
 | ||||
| 					// let the user extract the errorneous redirect URL
 | ||||
| 					if (request.redirect !== 'manual') { | ||||
| 						reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect')); | ||||
| 						finalize(); | ||||
| 						return; | ||||
| 					} | ||||
| 				} | ||||
| 
 | ||||
| 				// HTTP fetch step 5.5
 | ||||
| 				switch (request.redirect) { | ||||
| @@ -38041,6 +38061,12 @@ function fetch(url, opts) { | ||||
| 							size: request.size | ||||
| 						}; | ||||
| 
 | ||||
| 						if (!isDomainOrSubdomain(request.url, locationURL)) { | ||||
| 							for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) { | ||||
| 								requestOpts.headers.delete(name); | ||||
| 							} | ||||
| 						} | ||||
| 
 | ||||
| 						// HTTP-redirect fetch step 9
 | ||||
| 						if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { | ||||
| 							reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); | ||||
|   | ||||
| @@ -168,7 +168,8 @@ 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 }} | ||||
|     key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('**/*.cabal', '**/cabal.project', '**/cabal.project.freeze') }} | ||||
|     restore-keys: ${{ runner.os }}-${{ matrix.ghc }}- | ||||
| ``` | ||||
|  | ||||
| ## Java - Gradle | ||||
|   | ||||
							
								
								
									
										60
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										60
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @@ -840,9 +840,9 @@ | ||||
|       } | ||||
|     }, | ||||
|     "@types/node": { | ||||
|       "version": "12.20.37", | ||||
|       "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.37.tgz", | ||||
|       "integrity": "sha512-i1KGxqcvJaLQali+WuypQnXwcplhtNtjs66eNsZpp2P2FL/trJJxx/VWsM0YCL2iMoIJrbXje48lvIQAQ4p2ZA==" | ||||
|       "version": "12.20.42", | ||||
|       "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.42.tgz", | ||||
|       "integrity": "sha512-aI3/oo5DzyiI5R/xAhxxRzfZlWlsbbqdgxfTPkqu/Zt+23GXiJvMCyPJT4+xKSXOnLqoL8jJYMLTwvK2M3a5hw==" | ||||
|     }, | ||||
|     "@types/node-fetch": { | ||||
|       "version": "2.5.12", | ||||
| @@ -2071,14 +2071,13 @@ | ||||
|       } | ||||
|     }, | ||||
|     "eslint-module-utils": { | ||||
|       "version": "2.7.1", | ||||
|       "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.1.tgz", | ||||
|       "integrity": "sha512-fjoetBXQZq2tSTWZ9yWVl2KuFrTZZH3V+9iD1V1RfpDgxzJR+mPd/KZmMiA8gbPqdBzpNiEHOuT7IYEWxrH0zQ==", | ||||
|       "version": "2.7.2", | ||||
|       "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.2.tgz", | ||||
|       "integrity": "sha512-zquepFnWCY2ISMFwD/DqzaM++H+7PDzOpUvotJWm/y1BAFt5R4oeULgdrTejKqLkz7MA/tgstsUMNYc7wNdTrg==", | ||||
|       "dev": true, | ||||
|       "requires": { | ||||
|         "debug": "^3.2.7", | ||||
|         "find-up": "^2.1.0", | ||||
|         "pkg-dir": "^2.0.0" | ||||
|         "find-up": "^2.1.0" | ||||
|       }, | ||||
|       "dependencies": { | ||||
|         "debug": { | ||||
| @@ -2093,9 +2092,9 @@ | ||||
|       } | ||||
|     }, | ||||
|     "eslint-plugin-import": { | ||||
|       "version": "2.25.3", | ||||
|       "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.25.3.tgz", | ||||
|       "integrity": "sha512-RzAVbby+72IB3iOEL8clzPLzL3wpDrlwjsTBAQXgyp5SeTqqY+0bFubwuo+y/HLhNZcXV4XqTBO4LGsfyHIDXg==", | ||||
|       "version": "2.25.4", | ||||
|       "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.25.4.tgz", | ||||
|       "integrity": "sha512-/KJBASVFxpu0xg1kIBn9AUa8hQVnszpwgE7Ld0lKAlx7Ie87yzEzCgSkekt+le/YVhiaosO4Y14GDAOc41nfxA==", | ||||
|       "dev": true, | ||||
|       "requires": { | ||||
|         "array-includes": "^3.1.4", | ||||
| @@ -2103,14 +2102,14 @@ | ||||
|         "debug": "^2.6.9", | ||||
|         "doctrine": "^2.1.0", | ||||
|         "eslint-import-resolver-node": "^0.3.6", | ||||
|         "eslint-module-utils": "^2.7.1", | ||||
|         "eslint-module-utils": "^2.7.2", | ||||
|         "has": "^1.0.3", | ||||
|         "is-core-module": "^2.8.0", | ||||
|         "is-glob": "^4.0.3", | ||||
|         "minimatch": "^3.0.4", | ||||
|         "object.values": "^1.1.5", | ||||
|         "resolve": "^1.20.0", | ||||
|         "tsconfig-paths": "^3.11.0" | ||||
|         "tsconfig-paths": "^3.12.0" | ||||
|       }, | ||||
|       "dependencies": { | ||||
|         "debug": { | ||||
| @@ -3998,9 +3997,9 @@ | ||||
|       "dev": true | ||||
|     }, | ||||
|     "json-schema": { | ||||
|       "version": "0.2.3", | ||||
|       "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", | ||||
|       "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", | ||||
|       "version": "0.4.0", | ||||
|       "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", | ||||
|       "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", | ||||
|       "dev": true | ||||
|     }, | ||||
|     "json-schema-traverse": { | ||||
| @@ -4031,14 +4030,14 @@ | ||||
|       } | ||||
|     }, | ||||
|     "jsprim": { | ||||
|       "version": "1.4.1", | ||||
|       "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", | ||||
|       "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", | ||||
|       "version": "1.4.2", | ||||
|       "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", | ||||
|       "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", | ||||
|       "dev": true, | ||||
|       "requires": { | ||||
|         "assert-plus": "1.0.0", | ||||
|         "extsprintf": "1.3.0", | ||||
|         "json-schema": "0.2.3", | ||||
|         "json-schema": "0.4.0", | ||||
|         "verror": "1.10.0" | ||||
|       } | ||||
|     }, | ||||
| @@ -4327,9 +4326,9 @@ | ||||
|       } | ||||
|     }, | ||||
|     "node-fetch": { | ||||
|       "version": "2.6.6", | ||||
|       "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz", | ||||
|       "integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==", | ||||
|       "version": "2.6.7", | ||||
|       "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", | ||||
|       "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", | ||||
|       "requires": { | ||||
|         "whatwg-url": "^5.0.0" | ||||
|       }, | ||||
| @@ -4764,15 +4763,6 @@ | ||||
|         "node-modules-regexp": "^1.0.0" | ||||
|       } | ||||
|     }, | ||||
|     "pkg-dir": { | ||||
|       "version": "2.0.0", | ||||
|       "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", | ||||
|       "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", | ||||
|       "dev": true, | ||||
|       "requires": { | ||||
|         "find-up": "^2.1.0" | ||||
|       } | ||||
|     }, | ||||
|     "pn": { | ||||
|       "version": "1.1.0", | ||||
|       "resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz", | ||||
| @@ -6121,9 +6111,9 @@ | ||||
|       } | ||||
|     }, | ||||
|     "tsconfig-paths": { | ||||
|       "version": "3.11.0", | ||||
|       "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.11.0.tgz", | ||||
|       "integrity": "sha512-7ecdYDnIdmv639mmDwslG6KQg1Z9STTz1j7Gcz0xa+nshh/gKDAHcPxRbWOsA3SPp0tXP2leTcY9Kw+NAkfZzA==", | ||||
|       "version": "3.12.0", | ||||
|       "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz", | ||||
|       "integrity": "sha512-e5adrnOYT6zqVnWqZu7i/BQ3BnhzvGbjEjejFXO20lKIKpwTaupkCPgEfv4GZK1IBciJUEhYs3J3p75FdaTFVg==", | ||||
|       "dev": true, | ||||
|       "requires": { | ||||
|         "@types/json5": "^0.0.29", | ||||
|   | ||||
| @@ -31,13 +31,13 @@ | ||||
|   "devDependencies": { | ||||
|     "@types/jest": "^24.0.13", | ||||
|     "@types/nock": "^11.1.0", | ||||
|     "@types/node": "^12.20.7", | ||||
|     "@types/node": "^12.20.42", | ||||
|     "@typescript-eslint/eslint-plugin": "^2.7.0", | ||||
|     "@typescript-eslint/parser": "^2.7.0", | ||||
|     "@zeit/ncc": "^0.20.5", | ||||
|     "eslint": "^6.6.0", | ||||
|     "eslint-config-prettier": "^6.15.0", | ||||
|     "eslint-plugin-import": "^2.22.1", | ||||
|     "eslint-plugin-import": "^2.25.4", | ||||
|     "eslint-plugin-jest": "^23.20.0", | ||||
|     "eslint-plugin-prettier": "^3.3.1", | ||||
|     "eslint-plugin-simple-import-sort": "^5.0.2", | ||||
|   | ||||
		Reference in New Issue
	
	Block a user