mirror of
				https://kkgithub.com/actions/cache.git
				synced 2025-11-04 20:51:50 +08:00 
			
		
		
		
	Compare commits
	
		
			4 Commits
		
	
	
		
			tiwarishub
			...
			v3.0.9
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| ac8075791e | |||
| 0ff0597934 | |||
| 12681847c6 | |||
| 1a78ace131 | 
@ -6,7 +6,7 @@ This action allows caching dependencies and build outputs to improve workflow ex
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
## Documentation
 | 
					## 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
 | 
					## What's New
 | 
				
			||||||
### v3
 | 
					### v3
 | 
				
			||||||
 | 
				
			|||||||
@ -29,3 +29,6 @@
 | 
				
			|||||||
### 3.0.8
 | 
					### 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).
 | 
					- 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.
 | 
					- 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.
 | 
				
			||||||
 | 
				
			|||||||
@ -277,8 +277,8 @@ test("isCacheFeatureAvailable for ac enabled", () => {
 | 
				
			|||||||
test("isCacheFeatureAvailable for ac disabled on GHES", () => {
 | 
					test("isCacheFeatureAvailable for ac disabled on GHES", () => {
 | 
				
			||||||
    jest.spyOn(cache, "isFeatureAvailable").mockImplementation(() => false);
 | 
					    jest.spyOn(cache, "isFeatureAvailable").mockImplementation(() => false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const message =
 | 
					    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.
 | 
				
			||||||
        "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");
 | 
					    const infoMock = jest.spyOn(core, "info");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    try {
 | 
					    try {
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										3
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							@ -38452,7 +38452,8 @@ exports.getInputAsInt = getInputAsInt;
 | 
				
			|||||||
function isCacheFeatureAvailable() {
 | 
					function isCacheFeatureAvailable() {
 | 
				
			||||||
    if (!cache.isFeatureAvailable()) {
 | 
					    if (!cache.isFeatureAvailable()) {
 | 
				
			||||||
        if (isGhes()) {
 | 
					        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 {
 | 
					        else {
 | 
				
			||||||
            logWarning("An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.");
 | 
					            logWarning("An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.");
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										3
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							@ -38452,7 +38452,8 @@ exports.getInputAsInt = getInputAsInt;
 | 
				
			|||||||
function isCacheFeatureAvailable() {
 | 
					function isCacheFeatureAvailable() {
 | 
				
			||||||
    if (!cache.isFeatureAvailable()) {
 | 
					    if (!cache.isFeatureAvailable()) {
 | 
				
			||||||
        if (isGhes()) {
 | 
					        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 {
 | 
					        else {
 | 
				
			||||||
            logWarning("An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.");
 | 
					            logWarning("An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.");
 | 
				
			||||||
 | 
				
			|||||||
@ -332,7 +332,7 @@ If using `npm config` to retrieve the cache directory, ensure you run [actions/s
 | 
				
			|||||||
- name: restore lerna
 | 
					- name: restore lerna
 | 
				
			||||||
  uses: actions/cache@v3
 | 
					  uses: actions/cache@v3
 | 
				
			||||||
  with:
 | 
					  with:
 | 
				
			||||||
    path: **/node_modules
 | 
					    path: '**/node_modules'
 | 
				
			||||||
    key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
 | 
					    key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										4
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							@ -1,12 +1,12 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  "name": "cache",
 | 
					  "name": "cache",
 | 
				
			||||||
  "version": "3.0.8",
 | 
					  "version": "3.0.9",
 | 
				
			||||||
  "lockfileVersion": 2,
 | 
					  "lockfileVersion": 2,
 | 
				
			||||||
  "requires": true,
 | 
					  "requires": true,
 | 
				
			||||||
  "packages": {
 | 
					  "packages": {
 | 
				
			||||||
    "": {
 | 
					    "": {
 | 
				
			||||||
      "name": "cache",
 | 
					      "name": "cache",
 | 
				
			||||||
      "version": "3.0.8",
 | 
					      "version": "3.0.9",
 | 
				
			||||||
      "license": "MIT",
 | 
					      "license": "MIT",
 | 
				
			||||||
      "dependencies": {
 | 
					      "dependencies": {
 | 
				
			||||||
        "@actions/cache": "^3.0.4",
 | 
					        "@actions/cache": "^3.0.4",
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  "name": "cache",
 | 
					  "name": "cache",
 | 
				
			||||||
  "version": "3.0.8",
 | 
					  "version": "3.0.9",
 | 
				
			||||||
  "private": true,
 | 
					  "private": true,
 | 
				
			||||||
  "description": "Cache dependencies and build outputs",
 | 
					  "description": "Cache dependencies and build outputs",
 | 
				
			||||||
  "main": "dist/restore/index.js",
 | 
					  "main": "dist/restore/index.js",
 | 
				
			||||||
 | 
				
			|||||||
@ -81,7 +81,8 @@ export function isCacheFeatureAvailable(): boolean {
 | 
				
			|||||||
    if (!cache.isFeatureAvailable()) {
 | 
					    if (!cache.isFeatureAvailable()) {
 | 
				
			||||||
        if (isGhes()) {
 | 
					        if (isGhes()) {
 | 
				
			||||||
            logWarning(
 | 
					            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 {
 | 
					        } else {
 | 
				
			||||||
            logWarning(
 | 
					            logWarning(
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user