mirror of
				https://gitea.com/actions/checkout.git
				synced 2025-10-29 07:47:04 +00:00 
			
		
		
		
	Compare commits
	
		
			5 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | e2f20e631a | ||
|   | b2eb13baee | ||
|   | 7884fcad6b | ||
|   | f67ee5d622 | ||
|   | f25a3a9f25 | 
							
								
								
									
										6
									
								
								.github/workflows/check-dist.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								.github/workflows/check-dist.yml
									
									
									
									
										vendored
									
									
								
							| @@ -22,12 +22,12 @@ jobs: | |||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|  |  | ||||||
|     steps: |     steps: | ||||||
|       - uses: actions/checkout@v3 |       - uses: actions/checkout@v2 | ||||||
|  |  | ||||||
|       - name: Set Node.js 16.x |       - name: Set Node.js 12.x | ||||||
|         uses: actions/setup-node@v1 |         uses: actions/setup-node@v1 | ||||||
|         with: |         with: | ||||||
|           node-version: 16.x |           node-version: 12.x | ||||||
|  |  | ||||||
|       - name: Install dependencies |       - name: Install dependencies | ||||||
|         run: npm ci |         run: npm ci | ||||||
|   | |||||||
							
								
								
									
										2
									
								
								.github/workflows/codeql-analysis.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/codeql-analysis.yml
									
									
									
									
										vendored
									
									
								
							| @@ -39,7 +39,7 @@ jobs: | |||||||
|  |  | ||||||
|     steps: |     steps: | ||||||
|     - name: Checkout repository |     - name: Checkout repository | ||||||
|       uses: actions/checkout@v3 |       uses: actions/checkout@v2 | ||||||
|  |  | ||||||
|     - name: Initialize CodeQL |     - name: Initialize CodeQL | ||||||
|       uses: github/codeql-action/init@v1 |       uses: github/codeql-action/init@v1 | ||||||
|   | |||||||
							
								
								
									
										2
									
								
								.github/workflows/licensed.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/licensed.yml
									
									
									
									
										vendored
									
									
								
							| @@ -9,6 +9,6 @@ jobs: | |||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|     name: Check licenses |     name: Check licenses | ||||||
|     steps: |     steps: | ||||||
|       - uses: actions/checkout@v3 |       - uses: actions/checkout@v2 | ||||||
|       - run: npm ci |       - run: npm ci | ||||||
|       - run: npm run licensed-check |       - run: npm run licensed-check | ||||||
							
								
								
									
										10
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							| @@ -13,8 +13,8 @@ jobs: | |||||||
|     steps: |     steps: | ||||||
|       - uses: actions/setup-node@v1 |       - uses: actions/setup-node@v1 | ||||||
|         with: |         with: | ||||||
|           node-version: 16.x |           node-version: 12.x | ||||||
|       - uses: actions/checkout@v3 |       - uses: actions/checkout@v2 | ||||||
|       - run: npm ci |       - run: npm ci | ||||||
|       - run: npm run build |       - run: npm run build | ||||||
|       - run: npm run format-check |       - run: npm run format-check | ||||||
| @@ -32,7 +32,7 @@ jobs: | |||||||
|     steps: |     steps: | ||||||
|       # Clone this repo |       # Clone this repo | ||||||
|       - name: Checkout |       - name: Checkout | ||||||
|         uses: actions/checkout@v3 |         uses: actions/checkout@v2 | ||||||
|  |  | ||||||
|       # Basic checkout |       # Basic checkout | ||||||
|       - name: Checkout basic |       - name: Checkout basic | ||||||
| @@ -150,7 +150,7 @@ jobs: | |||||||
|     steps: |     steps: | ||||||
|       # Clone this repo |       # Clone this repo | ||||||
|       - name: Checkout |       - name: Checkout | ||||||
|         uses: actions/checkout@v3 |         uses: actions/checkout@v2 | ||||||
|  |  | ||||||
|       # Basic checkout using git |       # Basic checkout using git | ||||||
|       - name: Checkout basic |       - name: Checkout basic | ||||||
| @@ -182,7 +182,7 @@ jobs: | |||||||
|     steps: |     steps: | ||||||
|       # Clone this repo |       # Clone this repo | ||||||
|       - name: Checkout |       - name: Checkout | ||||||
|         uses: actions/checkout@v3 |         uses: actions/checkout@v2 | ||||||
|  |  | ||||||
|       # Basic checkout using git |       # Basic checkout using git | ||||||
|       - name: Checkout basic |       - name: Checkout basic | ||||||
|   | |||||||
							
								
								
									
										2
									
								
								.licenses/npm/node-fetch.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								.licenses/npm/node-fetch.dep.yml
									
									
									
										generated
									
									
									
								
							| @@ -1,6 +1,6 @@ | |||||||
| --- | --- | ||||||
| name: node-fetch | name: node-fetch | ||||||
| version: 2.6.7 | version: 2.6.5 | ||||||
| type: npm | type: npm | ||||||
| summary: A light-weight module that brings window.fetch to node.js | summary: A light-weight module that brings window.fetch to node.js | ||||||
| homepage: https://github.com/bitinn/node-fetch | homepage: https://github.com/bitinn/node-fetch | ||||||
|   | |||||||
							
								
								
									
										15
									
								
								CHANGELOG.md
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								CHANGELOG.md
									
									
									
									
									
								
							| @@ -1,20 +1,19 @@ | |||||||
| # Changelog | # Changelog | ||||||
|  |  | ||||||
| ## v3.0.2 | ## v2.5.0 | ||||||
| - [Add input `set-safe-directory`](https://github.com/actions/checkout/pull/770) | - [Bump @actions/core to v1.10.0](https://github.com/actions/checkout/pull/962) | ||||||
|  |  | ||||||
| ## v3.0.1 | ## v2.4.2 | ||||||
| - [Fixed an issue where checkout failed to run in container jobs due to the new git setting `safe.directory`](https://github.com/actions/checkout/pull/762) | - [Add input `set-safe-directory`](https://github.com/actions/checkout/pull/776) | ||||||
| - [Bumped various npm package versions](https://github.com/actions/checkout/pull/744) |  | ||||||
|  |  | ||||||
| ## v3.0.0 | ## v2.4.1 | ||||||
|  | - [Set the safe directory option on git to prevent git commands failing when running in containers](https://github.com/actions/checkout/pull/762) | ||||||
| - [Update to node 16](https://github.com/actions/checkout/pull/689) |  | ||||||
|  |  | ||||||
| ## v2.3.1 | ## v2.3.1 | ||||||
|  |  | ||||||
| - [Fix default branch resolution for .wiki and when using SSH](https://github.com/actions/checkout/pull/284) | - [Fix default branch resolution for .wiki and when using SSH](https://github.com/actions/checkout/pull/284) | ||||||
|  |  | ||||||
|  |  | ||||||
| ## v2.3.0 | ## v2.3.0 | ||||||
|  |  | ||||||
| - [Fallback to the default branch](https://github.com/actions/checkout/pull/278) | - [Fallback to the default branch](https://github.com/actions/checkout/pull/278) | ||||||
|   | |||||||
							
								
								
									
										45
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										45
									
								
								README.md
									
									
									
									
									
								
							| @@ -2,7 +2,7 @@ | |||||||
|   <a href="https://github.com/actions/checkout"><img alt="GitHub Actions status" src="https://github.com/actions/checkout/workflows/test-local/badge.svg"></a> |   <a href="https://github.com/actions/checkout"><img alt="GitHub Actions status" src="https://github.com/actions/checkout/workflows/test-local/badge.svg"></a> | ||||||
| </p> | </p> | ||||||
|  |  | ||||||
| # Checkout V3 | # Checkout V2 | ||||||
|  |  | ||||||
| This action checks-out your repository under `$GITHUB_WORKSPACE`, so your workflow can access it. | This action checks-out your repository under `$GITHUB_WORKSPACE`, so your workflow can access it. | ||||||
|  |  | ||||||
| @@ -14,14 +14,27 @@ When Git 2.18 or higher is not in your PATH, falls back to the REST API to downl | |||||||
|  |  | ||||||
| # What's new | # What's new | ||||||
|  |  | ||||||
| - Updated to the node16 runtime by default | - Improved performance | ||||||
|   - This requires a minimum [Actions Runner](https://github.com/actions/runner/releases/tag/v2.285.0) version of v2.285.0 to run, which is by default available in GHES 3.4 or later. |   - Fetches only a single commit by default | ||||||
|  | - Script authenticated git commands | ||||||
|  |   - Auth token persisted in the local git config | ||||||
|  | - Supports SSH | ||||||
|  | - Creates a local branch | ||||||
|  |   - No longer detached HEAD when checking out a branch | ||||||
|  | - Improved layout | ||||||
|  |   - The input `path` is always relative to $GITHUB_WORKSPACE | ||||||
|  |   - Aligns better with container actions, where $GITHUB_WORKSPACE gets mapped in | ||||||
|  | - Fallback to REST API download | ||||||
|  |   - When Git 2.18 or higher is not in the PATH, the REST API will be used to download the files | ||||||
|  |   - When using a job container, the container's PATH is used | ||||||
|  |  | ||||||
|  | Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous versions. | ||||||
|  |  | ||||||
| # Usage | # Usage | ||||||
|  |  | ||||||
| <!-- start usage --> | <!-- start usage --> | ||||||
| ```yaml | ```yaml | ||||||
| - uses: actions/checkout@v3 | - uses: actions/checkout@v2 | ||||||
|   with: |   with: | ||||||
|     # Repository name with owner. For example, actions/checkout |     # Repository name with owner. For example, actions/checkout | ||||||
|     # Default: ${{ github.repository }} |     # Default: ${{ github.repository }} | ||||||
| @@ -115,7 +128,7 @@ When Git 2.18 or higher is not in your PATH, falls back to the REST API to downl | |||||||
| ## Fetch all history for all tags and branches | ## Fetch all history for all tags and branches | ||||||
|  |  | ||||||
| ```yaml | ```yaml | ||||||
| - uses: actions/checkout@v3 | - uses: actions/checkout@v2 | ||||||
|   with: |   with: | ||||||
|     fetch-depth: 0 |     fetch-depth: 0 | ||||||
| ``` | ``` | ||||||
| @@ -123,7 +136,7 @@ When Git 2.18 or higher is not in your PATH, falls back to the REST API to downl | |||||||
| ## Checkout a different branch | ## Checkout a different branch | ||||||
|  |  | ||||||
| ```yaml | ```yaml | ||||||
| - uses: actions/checkout@v3 | - uses: actions/checkout@v2 | ||||||
|   with: |   with: | ||||||
|     ref: my-branch |     ref: my-branch | ||||||
| ``` | ``` | ||||||
| @@ -131,7 +144,7 @@ When Git 2.18 or higher is not in your PATH, falls back to the REST API to downl | |||||||
| ## Checkout HEAD^ | ## Checkout HEAD^ | ||||||
|  |  | ||||||
| ```yaml | ```yaml | ||||||
| - uses: actions/checkout@v3 | - uses: actions/checkout@v2 | ||||||
|   with: |   with: | ||||||
|     fetch-depth: 2 |     fetch-depth: 2 | ||||||
| - run: git checkout HEAD^ | - run: git checkout HEAD^ | ||||||
| @@ -141,12 +154,12 @@ When Git 2.18 or higher is not in your PATH, falls back to the REST API to downl | |||||||
|  |  | ||||||
| ```yaml | ```yaml | ||||||
| - name: Checkout | - name: Checkout | ||||||
|   uses: actions/checkout@v3 |   uses: actions/checkout@v2 | ||||||
|   with: |   with: | ||||||
|     path: main |     path: main | ||||||
|  |  | ||||||
| - name: Checkout tools repo | - name: Checkout tools repo | ||||||
|   uses: actions/checkout@v3 |   uses: actions/checkout@v2 | ||||||
|   with: |   with: | ||||||
|     repository: my-org/my-tools |     repository: my-org/my-tools | ||||||
|     path: my-tools |     path: my-tools | ||||||
| @@ -156,10 +169,10 @@ When Git 2.18 or higher is not in your PATH, falls back to the REST API to downl | |||||||
|  |  | ||||||
| ```yaml | ```yaml | ||||||
| - name: Checkout | - name: Checkout | ||||||
|   uses: actions/checkout@v3 |   uses: actions/checkout@v2 | ||||||
|  |  | ||||||
| - name: Checkout tools repo | - name: Checkout tools repo | ||||||
|   uses: actions/checkout@v3 |   uses: actions/checkout@v2 | ||||||
|   with: |   with: | ||||||
|     repository: my-org/my-tools |     repository: my-org/my-tools | ||||||
|     path: my-tools |     path: my-tools | ||||||
| @@ -169,12 +182,12 @@ When Git 2.18 or higher is not in your PATH, falls back to the REST API to downl | |||||||
|  |  | ||||||
| ```yaml | ```yaml | ||||||
| - name: Checkout | - name: Checkout | ||||||
|   uses: actions/checkout@v3 |   uses: actions/checkout@v2 | ||||||
|   with: |   with: | ||||||
|     path: main |     path: main | ||||||
|  |  | ||||||
| - name: Checkout private tools | - name: Checkout private tools | ||||||
|   uses: actions/checkout@v3 |   uses: actions/checkout@v2 | ||||||
|   with: |   with: | ||||||
|     repository: my-org/my-private-tools |     repository: my-org/my-private-tools | ||||||
|     token: ${{ secrets.GH_PAT }} # `GH_PAT` is a secret that contains your PAT |     token: ${{ secrets.GH_PAT }} # `GH_PAT` is a secret that contains your PAT | ||||||
| @@ -187,7 +200,7 @@ When Git 2.18 or higher is not in your PATH, falls back to the REST API to downl | |||||||
| ## Checkout pull request HEAD commit instead of merge commit | ## Checkout pull request HEAD commit instead of merge commit | ||||||
|  |  | ||||||
| ```yaml | ```yaml | ||||||
| - uses: actions/checkout@v3 | - uses: actions/checkout@v2 | ||||||
|   with: |   with: | ||||||
|     ref: ${{ github.event.pull_request.head.sha }} |     ref: ${{ github.event.pull_request.head.sha }} | ||||||
| ``` | ``` | ||||||
| @@ -203,7 +216,7 @@ jobs: | |||||||
|   build: |   build: | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|     steps: |     steps: | ||||||
|       - uses: actions/checkout@v3 |       - uses: actions/checkout@v2 | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
| ## Push a commit using the built-in token | ## Push a commit using the built-in token | ||||||
| @@ -214,7 +227,7 @@ jobs: | |||||||
|   build: |   build: | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|     steps: |     steps: | ||||||
|       - uses: actions/checkout@v3 |       - uses: actions/checkout@v2 | ||||||
|       - run: | |       - run: | | ||||||
|           date > generated.txt |           date > generated.txt | ||||||
|           git config user.name github-actions |           git config user.name github-actions | ||||||
|   | |||||||
| @@ -72,6 +72,6 @@ inputs: | |||||||
|     description: Add repository path as safe.directory for Git global config by running `git config --global --add safe.directory <path>` |     description: Add repository path as safe.directory for Git global config by running `git config --global --add safe.directory <path>` | ||||||
|     default: true |     default: true | ||||||
| runs: | runs: | ||||||
|   using: node16 |   using: node12 | ||||||
|   main: dist/index.js |   main: dist/index.js | ||||||
|   post: dist/index.js |   post: dist/index.js | ||||||
|   | |||||||
							
								
								
									
										2966
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2966
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										99
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										99
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @@ -5,9 +5,28 @@ | |||||||
|   "requires": true, |   "requires": true, | ||||||
|   "dependencies": { |   "dependencies": { | ||||||
|     "@actions/core": { |     "@actions/core": { | ||||||
|       "version": "1.2.6", |       "version": "1.10.0", | ||||||
|       "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.6.tgz", |       "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz", | ||||||
|       "integrity": "sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA==" |       "integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==", | ||||||
|  |       "requires": { | ||||||
|  |         "@actions/http-client": "^2.0.1", | ||||||
|  |         "uuid": "^8.3.2" | ||||||
|  |       }, | ||||||
|  |       "dependencies": { | ||||||
|  |         "@actions/http-client": { | ||||||
|  |           "version": "2.0.1", | ||||||
|  |           "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", | ||||||
|  |           "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", | ||||||
|  |           "requires": { | ||||||
|  |             "tunnel": "^0.0.6" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         "uuid": { | ||||||
|  |           "version": "8.3.2", | ||||||
|  |           "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", | ||||||
|  |           "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" | ||||||
|  |         } | ||||||
|  |       } | ||||||
|     }, |     }, | ||||||
|     "@actions/exec": { |     "@actions/exec": { | ||||||
|       "version": "1.0.1", |       "version": "1.0.1", | ||||||
| @@ -1929,6 +1948,12 @@ | |||||||
|             "picomatch": "^2.2.3" |             "picomatch": "^2.2.3" | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|  |         "minimist": { | ||||||
|  |           "version": "1.2.5", | ||||||
|  |           "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", | ||||||
|  |           "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", | ||||||
|  |           "dev": true | ||||||
|  |         }, | ||||||
|         "normalize-path": { |         "normalize-path": { | ||||||
|           "version": "3.0.0", |           "version": "3.0.0", | ||||||
|           "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", |           "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", | ||||||
| @@ -3319,6 +3344,12 @@ | |||||||
|             "picomatch": "^2.2.3" |             "picomatch": "^2.2.3" | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|  |         "minimist": { | ||||||
|  |           "version": "1.2.5", | ||||||
|  |           "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", | ||||||
|  |           "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", | ||||||
|  |           "dev": true | ||||||
|  |         }, | ||||||
|         "normalize-path": { |         "normalize-path": { | ||||||
|           "version": "3.0.0", |           "version": "3.0.0", | ||||||
|           "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", |           "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", | ||||||
| @@ -5377,6 +5408,12 @@ | |||||||
|             "picomatch": "^2.2.3" |             "picomatch": "^2.2.3" | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|  |         "minimist": { | ||||||
|  |           "version": "1.2.5", | ||||||
|  |           "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", | ||||||
|  |           "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", | ||||||
|  |           "dev": true | ||||||
|  |         }, | ||||||
|         "normalize-path": { |         "normalize-path": { | ||||||
|           "version": "3.0.0", |           "version": "3.0.0", | ||||||
|           "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", |           "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", | ||||||
| @@ -7696,6 +7733,12 @@ | |||||||
|             "minimist": "^1.2.5" |             "minimist": "^1.2.5" | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|  |         "minimist": { | ||||||
|  |           "version": "1.2.5", | ||||||
|  |           "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", | ||||||
|  |           "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", | ||||||
|  |           "dev": true | ||||||
|  |         }, | ||||||
|         "semver": { |         "semver": { | ||||||
|           "version": "6.3.0", |           "version": "6.3.0", | ||||||
|           "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", |           "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", | ||||||
| @@ -9344,6 +9387,12 @@ | |||||||
|             "picomatch": "^2.2.3" |             "picomatch": "^2.2.3" | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|  |         "minimist": { | ||||||
|  |           "version": "1.2.5", | ||||||
|  |           "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", | ||||||
|  |           "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", | ||||||
|  |           "dev": true | ||||||
|  |         }, | ||||||
|         "normalize-path": { |         "normalize-path": { | ||||||
|           "version": "3.0.0", |           "version": "3.0.0", | ||||||
|           "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", |           "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", | ||||||
| @@ -11359,6 +11408,12 @@ | |||||||
|             "picomatch": "^2.2.3" |             "picomatch": "^2.2.3" | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|  |         "minimist": { | ||||||
|  |           "version": "1.2.5", | ||||||
|  |           "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", | ||||||
|  |           "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", | ||||||
|  |           "dev": true | ||||||
|  |         }, | ||||||
|         "normalize-path": { |         "normalize-path": { | ||||||
|           "version": "3.0.0", |           "version": "3.0.0", | ||||||
|           "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", |           "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", | ||||||
| @@ -12904,6 +12959,12 @@ | |||||||
|             "picomatch": "^2.2.3" |             "picomatch": "^2.2.3" | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|  |         "minimist": { | ||||||
|  |           "version": "1.2.5", | ||||||
|  |           "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", | ||||||
|  |           "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", | ||||||
|  |           "dev": true | ||||||
|  |         }, | ||||||
|         "normalize-path": { |         "normalize-path": { | ||||||
|           "version": "3.0.0", |           "version": "3.0.0", | ||||||
|           "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", |           "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", | ||||||
| @@ -13658,6 +13719,12 @@ | |||||||
|             "picomatch": "^2.2.3" |             "picomatch": "^2.2.3" | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|  |         "minimist": { | ||||||
|  |           "version": "1.2.5", | ||||||
|  |           "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", | ||||||
|  |           "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", | ||||||
|  |           "dev": true | ||||||
|  |         }, | ||||||
|         "normalize-path": { |         "normalize-path": { | ||||||
|           "version": "3.0.0", |           "version": "3.0.0", | ||||||
|           "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", |           "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", | ||||||
| @@ -14585,6 +14652,12 @@ | |||||||
|           "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", |           "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", | ||||||
|           "dev": true |           "dev": true | ||||||
|         }, |         }, | ||||||
|  |         "minimist": { | ||||||
|  |           "version": "1.2.5", | ||||||
|  |           "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", | ||||||
|  |           "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", | ||||||
|  |           "dev": true | ||||||
|  |         }, | ||||||
|         "normalize-path": { |         "normalize-path": { | ||||||
|           "version": "3.0.0", |           "version": "3.0.0", | ||||||
|           "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", |           "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", | ||||||
| @@ -15676,6 +15749,14 @@ | |||||||
|       "dev": true, |       "dev": true, | ||||||
|       "requires": { |       "requires": { | ||||||
|         "minimist": "^1.2.0" |         "minimist": "^1.2.0" | ||||||
|  |       }, | ||||||
|  |       "dependencies": { | ||||||
|  |         "minimist": { | ||||||
|  |           "version": "1.2.5", | ||||||
|  |           "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", | ||||||
|  |           "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", | ||||||
|  |           "dev": true | ||||||
|  |         } | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "kleur": { |     "kleur": { | ||||||
| @@ -15872,9 +15953,9 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "minimist": { |     "minimist": { | ||||||
|       "version": "1.2.6", |       "version": "1.2.5", | ||||||
|       "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", |       "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", | ||||||
|       "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", |       "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", | ||||||
|       "dev": true |       "dev": true | ||||||
|     }, |     }, | ||||||
|     "ms": { |     "ms": { | ||||||
| @@ -15895,9 +15976,9 @@ | |||||||
|       "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" |       "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" | ||||||
|     }, |     }, | ||||||
|     "node-fetch": { |     "node-fetch": { | ||||||
|       "version": "2.6.7", |       "version": "2.6.5", | ||||||
|       "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", |       "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.5.tgz", | ||||||
|       "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", |       "integrity": "sha512-mmlIVHJEu5rnIxgEgez6b9GgWXbkZj5YZ7fx+2r94a2E+Uirsp6HsPTPlomfdHtpt/B0cdKviwkoaM6pyvUOpQ==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "whatwg-url": "^5.0.0" |         "whatwg-url": "^5.0.0" | ||||||
|       }, |       }, | ||||||
|   | |||||||
| @@ -28,7 +28,7 @@ | |||||||
|   }, |   }, | ||||||
|   "homepage": "https://github.com/actions/checkout#readme", |   "homepage": "https://github.com/actions/checkout#readme", | ||||||
|   "dependencies": { |   "dependencies": { | ||||||
|     "@actions/core": "^1.2.6", |     "@actions/core": "^1.10.0", | ||||||
|     "@actions/exec": "^1.0.1", |     "@actions/exec": "^1.0.1", | ||||||
|     "@actions/github": "^2.2.0", |     "@actions/github": "^2.2.0", | ||||||
|     "@actions/io": "^1.0.1", |     "@actions/io": "^1.0.1", | ||||||
|   | |||||||
| @@ -120,7 +120,7 @@ function updateUsage( | |||||||
| } | } | ||||||
|  |  | ||||||
| updateUsage( | updateUsage( | ||||||
|   'actions/checkout@v3', |   'actions/checkout@v2', | ||||||
|   path.join(__dirname, '..', '..', 'action.yml'), |   path.join(__dirname, '..', '..', 'action.yml'), | ||||||
|   path.join(__dirname, '..', '..', 'README.md') |   path.join(__dirname, '..', '..', 'README.md') | ||||||
| ) | ) | ||||||
|   | |||||||
| @@ -5,4 +5,4 @@ set -e | |||||||
| src/misc/licensed-download.sh | src/misc/licensed-download.sh | ||||||
|  |  | ||||||
| echo 'Running: licensed cached' | echo 'Running: licensed cached' | ||||||
| _temp/licensed-3.6.0/licensed status | _temp/licensed-3.3.1/licensed status | ||||||
| @@ -2,23 +2,23 @@ | |||||||
|  |  | ||||||
| set -e | set -e | ||||||
|  |  | ||||||
| if [ ! -f _temp/licensed-3.6.0.done ]; then | if [ ! -f _temp/licensed-3.3.1.done ]; then | ||||||
|   echo 'Clearing temp' |   echo 'Clearing temp' | ||||||
|   rm -rf _temp/licensed-3.6.0 || true |   rm -rf _temp/licensed-3.3.1 || true | ||||||
|  |  | ||||||
|   echo 'Downloading licensed' |   echo 'Downloading licensed' | ||||||
|   mkdir -p _temp/licensed-3.6.0 |   mkdir -p _temp/licensed-3.3.1 | ||||||
|   pushd _temp/licensed-3.6.0 |   pushd _temp/licensed-3.3.1 | ||||||
|   if [[ "$OSTYPE" == "darwin"* ]]; then |   if [[ "$OSTYPE" == "darwin"* ]]; then | ||||||
|     curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/3.6.0/licensed-3.6.0-darwin-x64.tar.gz |     curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/3.3.1/licensed-3.3.1-darwin-x64.tar.gz | ||||||
|   else |   else | ||||||
|     curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/3.6.0/licensed-3.6.0-linux-x64.tar.gz |     curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/3.3.1/licensed-3.3.1-linux-x64.tar.gz | ||||||
|   fi |   fi | ||||||
|  |  | ||||||
|   echo 'Extracting licenesed' |   echo 'Extracting licenesed' | ||||||
|   tar -xzf licensed.tar.gz |   tar -xzf licensed.tar.gz | ||||||
|   popd |   popd | ||||||
|   touch _temp/licensed-3.6.0.done |   touch _temp/licensed-3.3.1.done | ||||||
| else | else | ||||||
|   echo 'Licensed already downloaded' |   echo 'Licensed already downloaded' | ||||||
| fi | fi | ||||||
|   | |||||||
| @@ -5,4 +5,4 @@ set -e | |||||||
| src/misc/licensed-download.sh | src/misc/licensed-download.sh | ||||||
|  |  | ||||||
| echo 'Running: licensed cached' | echo 'Running: licensed cached' | ||||||
| _temp/licensed-3.6.0/licensed cache | _temp/licensed-3.3.1/licensed cache | ||||||
| @@ -1,71 +1,60 @@ | |||||||
| import * as coreCommand from '@actions/core/lib/command' | import * as core from '@actions/core' | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * Indicates whether the POST action is running |  * Indicates whether the POST action is running | ||||||
|  */ |  */ | ||||||
| export const IsPost = !!process.env['STATE_isPost'] | export const IsPost = !!core.getState('isPost') | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * The repository path for the POST action. The value is empty during the MAIN action. |  * The repository path for the POST action. The value is empty during the MAIN action. | ||||||
|  */ |  */ | ||||||
| export const RepositoryPath = | export const RepositoryPath = core.getState('repositoryPath') | ||||||
|   (process.env['STATE_repositoryPath'] as string) || '' |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * The set-safe-directory for the POST action. The value is set if input: 'safe-directory' is set during the MAIN action. |  * The set-safe-directory for the POST action. The value is set if input: 'safe-directory' is set during the MAIN action. | ||||||
|  */ |  */ | ||||||
| export const PostSetSafeDirectory = | export const PostSetSafeDirectory = core.getState('setSafeDirectory') === 'true' | ||||||
|   (process.env['STATE_setSafeDirectory'] as string) === 'true' |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * The SSH key path for the POST action. The value is empty during the MAIN action. |  * The SSH key path for the POST action. The value is empty during the MAIN action. | ||||||
|  */ |  */ | ||||||
| export const SshKeyPath = (process.env['STATE_sshKeyPath'] as string) || '' | export const SshKeyPath = core.getState('sshKeyPath') | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * The SSH known hosts path for the POST action. The value is empty during the MAIN action. |  * The SSH known hosts path for the POST action. The value is empty during the MAIN action. | ||||||
|  */ |  */ | ||||||
| export const SshKnownHostsPath = | export const SshKnownHostsPath = core.getState('sshKnownHostsPath') | ||||||
|   (process.env['STATE_sshKnownHostsPath'] as string) || '' |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * Save the repository path so the POST action can retrieve the value. |  * Save the repository path so the POST action can retrieve the value. | ||||||
|  */ |  */ | ||||||
| export function setRepositoryPath(repositoryPath: string) { | export function setRepositoryPath(repositoryPath: string) { | ||||||
|   coreCommand.issueCommand( |   core.saveState('repositoryPath', repositoryPath) | ||||||
|     'save-state', |  | ||||||
|     {name: 'repositoryPath'}, |  | ||||||
|     repositoryPath |  | ||||||
|   ) |  | ||||||
| } | } | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * Save the SSH key path so the POST action can retrieve the value. |  * Save the SSH key path so the POST action can retrieve the value. | ||||||
|  */ |  */ | ||||||
| export function setSshKeyPath(sshKeyPath: string) { | export function setSshKeyPath(sshKeyPath: string) { | ||||||
|   coreCommand.issueCommand('save-state', {name: 'sshKeyPath'}, sshKeyPath) |   core.saveState('sshKeyPath', sshKeyPath) | ||||||
| } | } | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * Save the SSH known hosts path so the POST action can retrieve the value. |  * Save the SSH known hosts path so the POST action can retrieve the value. | ||||||
|  */ |  */ | ||||||
| export function setSshKnownHostsPath(sshKnownHostsPath: string) { | export function setSshKnownHostsPath(sshKnownHostsPath: string) { | ||||||
|   coreCommand.issueCommand( |   core.saveState('sshKnownHostsPath', sshKnownHostsPath) | ||||||
|     'save-state', |  | ||||||
|     {name: 'sshKnownHostsPath'}, |  | ||||||
|     sshKnownHostsPath |  | ||||||
|   ) |  | ||||||
| } | } | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * Save the sef-safe-directory input so the POST action can retrieve the value. |  * Save the sef-safe-directory input so the POST action can retrieve the value. | ||||||
|  */ |  */ | ||||||
| export function setSafeDirectory() { | export function setSafeDirectory() { | ||||||
|   coreCommand.issueCommand('save-state', {name: 'setSafeDirectory'}, 'true') |   core.saveState('setSafeDirectory', 'true') | ||||||
| } | } | ||||||
|  |  | ||||||
| // Publish a variable so that when the POST action runs, it can determine it should run the cleanup logic. | // Publish a variable so that when the POST action runs, it can determine it should run the cleanup logic. | ||||||
| // This is necessary since we don't have a separate entry point. | // This is necessary since we don't have a separate entry point. | ||||||
| if (!IsPost) { | if (!IsPost) { | ||||||
|   coreCommand.issueCommand('save-state', {name: 'isPost'}, 'true') |   core.saveState('isPost', 'true') | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user