mirror of
				https://gitea.com/actions/cache.git
				synced 2025-11-04 07:47:08 +00:00 
			
		
		
		
	Compare commits
	
		
			26 Commits
		
	
	
		
			vsvipul/ch
			...
			v3.1.0-bet
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					4d2f35c1eb | ||
| 
						 | 
					ca82ccb28d | ||
| 
						 | 
					cec18c5924 | ||
| 
						 | 
					a57932faba | ||
| 
						 | 
					04b13caea4 | ||
| 
						 | 
					941bc71a24 | ||
| 
						 | 
					08d8639046 | ||
| 
						 | 
					a2f324eeb7 | ||
| 
						 | 
					35f4702f6c | ||
| 
						 | 
					e050ebdd63 | ||
| 
						 | 
					0d47d164e9 | ||
| 
						 | 
					e2d614414f | ||
| 
						 | 
					532752012e | ||
| 
						 | 
					b26da1fc31 | ||
| 
						 | 
					ce61cc4d24 | ||
| 
						 | 
					268ae08cbc | ||
| 
						 | 
					b4ac56fa43 | ||
| 
						 | 
					24f54d74c0 | ||
| 
						 | 
					8d99052cbc | ||
| 
						 | 
					58a0402e7d | ||
| 
						 | 
					7920f570b8 | ||
| 
						 | 
					f8116c8945 | ||
| 
						 | 
					2a6cd14175 | ||
| 
						 | 
					651d82954c | ||
| 
						 | 
					cfa1b7695d | ||
| 
						 | 
					fa8856311e | 
							
								
								
									
										8
									
								
								.github/workflows/add-reviewer-pr.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								.github/workflows/add-reviewer-pr.yml
									
									
									
									
										vendored
									
									
								
							@@ -1,6 +1,6 @@
 | 
				
			|||||||
name: Add Reviewer PR
 | 
					name: Add Reviewer PR
 | 
				
			||||||
on:
 | 
					on:
 | 
				
			||||||
  pull_request:
 | 
					  pull_request_target:
 | 
				
			||||||
    types: [opened]
 | 
					    types: [opened]
 | 
				
			||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
  run-action:
 | 
					  run-action:
 | 
				
			||||||
@@ -11,6 +11,10 @@ jobs:
 | 
				
			|||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
        echo "CURRENT=$(curl --request GET 'https://api.pagerduty.com/oncalls?include[]=users&schedule_ids[]=P5VG2BX&earliest=true' --header 'Authorization: Token token=${{ secrets.PAGERDUTY_TOKEN }}' --header 'Accept: application/vnd.pagerduty+json;version=2' --header 'Content-Type: application/json' | jq -r '.oncalls[].user.name')" >> $GITHUB_OUTPUT
 | 
					        echo "CURRENT=$(curl --request GET 'https://api.pagerduty.com/oncalls?include[]=users&schedule_ids[]=P5VG2BX&earliest=true' --header 'Authorization: Token token=${{ secrets.PAGERDUTY_TOKEN }}' --header 'Accept: application/vnd.pagerduty+json;version=2' --header 'Content-Type: application/json' | jq -r '.oncalls[].user.name')" >> $GITHUB_OUTPUT
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    - name: add_reviewer
 | 
					    - name: Request Review
 | 
				
			||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
        curl -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN}}" https://api.github.com/repos/${{github.repository}}/pulls/${{ github.event.pull_request.number}}/requested_reviewers -d '{"reviewers":["${{steps.oncall.outputs.CURRENT}}"]}'
 | 
					        curl -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN}}" https://api.github.com/repos/${{github.repository}}/pulls/${{ github.event.pull_request.number}}/requested_reviewers -d '{"reviewers":["${{steps.oncall.outputs.CURRENT}}"]}'
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					    - name: Add Assignee
 | 
				
			||||||
 | 
					      run: |
 | 
				
			||||||
 | 
					        curl -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN}}" https://api.github.com/repos/${{github.repository}}/issues/${{ github.event.pull_request.number}}/assignees -d '{"assignees":["${{steps.oncall.outputs.CURRENT}}"]}'    
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										1
									
								
								.github/workflows/check-dist.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.github/workflows/check-dist.yml
									
									
									
									
										vendored
									
									
								
							@@ -27,6 +27,7 @@ jobs:
 | 
				
			|||||||
        uses: actions/setup-node@v3
 | 
					        uses: actions/setup-node@v3
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          node-version: 16.x
 | 
					          node-version: 16.x
 | 
				
			||||||
 | 
					          cache: npm
 | 
				
			||||||
      - name: Install dependencies
 | 
					      - name: Install dependencies
 | 
				
			||||||
        run: npm ci
 | 
					        run: npm ci
 | 
				
			||||||
      - name: Rebuild the dist/ directory
 | 
					      - name: Rebuild the dist/ directory
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										12
									
								
								.github/workflows/workflow.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								.github/workflows/workflow.yml
									
									
									
									
										vendored
									
									
								
							@@ -25,17 +25,7 @@ jobs:
 | 
				
			|||||||
      uses: actions/setup-node@v3
 | 
					      uses: actions/setup-node@v3
 | 
				
			||||||
      with:
 | 
					      with:
 | 
				
			||||||
        node-version: 16.x
 | 
					        node-version: 16.x
 | 
				
			||||||
    - name: Determine npm cache directory
 | 
					        cache: npm
 | 
				
			||||||
      id: npm-cache
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        echo "::set-output name=dir::$(npm config get cache)"
 | 
					 | 
				
			||||||
    - name: Restore npm cache
 | 
					 | 
				
			||||||
      uses: actions/cache@v3
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        path: ${{ steps.npm-cache.outputs.dir }}
 | 
					 | 
				
			||||||
        key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
 | 
					 | 
				
			||||||
        restore-keys: |
 | 
					 | 
				
			||||||
          ${{ runner.os }}-node-
 | 
					 | 
				
			||||||
    - run: npm ci
 | 
					    - run: npm ci
 | 
				
			||||||
    - name: Prettier Format Check
 | 
					    - name: Prettier Format Check
 | 
				
			||||||
      run: npm run format-check
 | 
					      run: npm run format-check
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -40,3 +40,6 @@
 | 
				
			|||||||
### 3.0.11
 | 
					### 3.0.11
 | 
				
			||||||
- Update toolkit version to 3.0.5 to include `@actions/core@^1.10.0`
 | 
					- 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`
 | 
					- Update `@actions/cache` to use updated `saveState` and `setOutput` functions from `@actions/core@^1.10.0`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### 3.1.0-beta.1
 | 
				
			||||||
 | 
					- Update `@actions/cache` on windows to use gnu tar and zstd by default and fallback to bsdtar and zstd if gnu tar is not available. ([issue](https://github.com/actions/cache/issues/984))
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										806
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										806
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										806
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										806
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										6552
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										6552
									
								
								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",
 | 
					  "name": "cache",
 | 
				
			||||||
  "version": "3.0.11",
 | 
					  "version": "3.1.0-beta.1",
 | 
				
			||||||
  "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",
 | 
				
			||||||
@@ -23,29 +23,29 @@
 | 
				
			|||||||
  "author": "GitHub",
 | 
					  "author": "GitHub",
 | 
				
			||||||
  "license": "MIT",
 | 
					  "license": "MIT",
 | 
				
			||||||
  "dependencies": {
 | 
					  "dependencies": {
 | 
				
			||||||
    "@actions/cache": "^3.0.5",
 | 
					    "@actions/cache": "3.1.0-beta.1",
 | 
				
			||||||
    "@actions/core": "^1.10.0",
 | 
					    "@actions/core": "^1.10.0",
 | 
				
			||||||
    "@actions/exec": "^1.1.1",
 | 
					    "@actions/exec": "^1.1.1",
 | 
				
			||||||
    "@actions/io": "^1.1.2"
 | 
					    "@actions/io": "^1.1.2"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "devDependencies": {
 | 
					  "devDependencies": {
 | 
				
			||||||
    "@types/jest": "^27.5.0",
 | 
					    "@types/jest": "^27.5.2",
 | 
				
			||||||
    "@types/nock": "^11.1.0",
 | 
					    "@types/nock": "^11.1.0",
 | 
				
			||||||
    "@types/node": "^16.11.33",
 | 
					    "@types/node": "^16.18.3",
 | 
				
			||||||
    "@typescript-eslint/eslint-plugin": "^5.22.0",
 | 
					    "@typescript-eslint/eslint-plugin": "^5.45.0",
 | 
				
			||||||
    "@typescript-eslint/parser": "^5.22.0",
 | 
					    "@typescript-eslint/parser": "^5.45.0",
 | 
				
			||||||
    "@zeit/ncc": "^0.20.5",
 | 
					    "@zeit/ncc": "^0.20.5",
 | 
				
			||||||
    "eslint": "^8.14.0",
 | 
					    "eslint": "^8.28.0",
 | 
				
			||||||
    "eslint-config-prettier": "^8.5.0",
 | 
					    "eslint-config-prettier": "^8.5.0",
 | 
				
			||||||
    "eslint-plugin-import": "^2.26.0",
 | 
					    "eslint-plugin-import": "^2.26.0",
 | 
				
			||||||
    "eslint-plugin-jest": "^26.1.5",
 | 
					    "eslint-plugin-jest": "^26.9.0",
 | 
				
			||||||
    "eslint-plugin-prettier": "^4.0.0",
 | 
					    "eslint-plugin-prettier": "^4.2.1",
 | 
				
			||||||
    "eslint-plugin-simple-import-sort": "^7.0.0",
 | 
					    "eslint-plugin-simple-import-sort": "^7.0.0",
 | 
				
			||||||
    "jest": "^28.0.3",
 | 
					    "jest": "^28.1.3",
 | 
				
			||||||
    "jest-circus": "^27.5.1",
 | 
					    "jest-circus": "^27.5.1",
 | 
				
			||||||
    "nock": "^13.2.4",
 | 
					    "nock": "^13.2.9",
 | 
				
			||||||
    "prettier": "^2.6.2",
 | 
					    "prettier": "^2.8.0",
 | 
				
			||||||
    "ts-jest": "^28.0.2",
 | 
					    "ts-jest": "^28.0.8",
 | 
				
			||||||
    "typescript": "^4.6.4"
 | 
					    "typescript": "^4.9.3"
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -77,19 +77,20 @@ export function getInputAsInt(
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export function isCacheFeatureAvailable(): boolean {
 | 
					export function isCacheFeatureAvailable(): boolean {
 | 
				
			||||||
    if (!cache.isFeatureAvailable()) {
 | 
					    if (cache.isFeatureAvailable()) {
 | 
				
			||||||
 | 
					        return true;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    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)`
 | 
					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."
 | 
					 | 
				
			||||||
            );
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        return false;
 | 
					        return false;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return true;
 | 
					    logWarning(
 | 
				
			||||||
 | 
					        "An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions."
 | 
				
			||||||
 | 
					    );
 | 
				
			||||||
 | 
					    return false;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user