mirror of
				https://kkgithub.com/actions/checkout
				synced 2025-10-31 22:31:56 +08:00 
			
		
		
		
	Compare commits
	
		
			2 Commits
		
	
	
		
			v3.5.0
			...
			users/vmjo
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 8e567abb9a | |||
| b2cc39f7b2 | 
							
								
								
									
										11
									
								
								.github/workflows/update-main-version.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										11
									
								
								.github/workflows/update-main-version.yml
									
									
									
									
										vendored
									
									
								
							| @ -1,5 +1,5 @@ | |||||||
| name: Update Main Version | name: Update Main Version | ||||||
| run-name: Move ${{ github.event.inputs.major_version }} to ${{ github.event.inputs.target }} | run-name: Move ${{ github.event.inputs.main_version }} to ${{ github.event.inputs.target }} | ||||||
|  |  | ||||||
| on: | on: | ||||||
|   workflow_dispatch: |   workflow_dispatch: | ||||||
| @ -7,12 +7,11 @@ on: | |||||||
|       target: |       target: | ||||||
|         description: The tag or reference to use |         description: The tag or reference to use | ||||||
|         required: true |         required: true | ||||||
|       major_version: |       main_version: | ||||||
|         type: choice |         type: choice | ||||||
|         description: The major version to update |         description: The main version to update | ||||||
|         options: |         options: | ||||||
|           - v3 |           - v3 | ||||||
|           - v2 |  | ||||||
|  |  | ||||||
| jobs: | jobs: | ||||||
|   tag: |   tag: | ||||||
| @ -26,6 +25,6 @@ jobs: | |||||||
|         git config user.name github-actions |         git config user.name github-actions | ||||||
|         git config user.email github-actions@github.com |         git config user.email github-actions@github.com | ||||||
|     - name: Tag new target |     - name: Tag new target | ||||||
|       run: git tag -f ${{ github.event.inputs.major_version }} ${{ github.event.inputs.target }} |       run: git tag -f ${{ github.event.inputs.main_version }} ${{ github.event.inputs.target }} | ||||||
|     - name: Push new tag |     - name: Push new tag | ||||||
|       run: git push origin ${{ github.event.inputs.major_version }} --force |       run: git push origin ${{ github.event.inputs.main_version }} --force | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								.licenses/npm/@actions/io.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								.licenses/npm/@actions/io.dep.yml
									
									
									
										generated
									
									
									
								
							| @ -1,6 +1,6 @@ | |||||||
| --- | --- | ||||||
| name: "@actions/io" | name: "@actions/io" | ||||||
| version: 1.1.3 | version: 1.1.2 | ||||||
| type: npm | type: npm | ||||||
| summary: Actions io lib | summary: Actions io lib | ||||||
| homepage: https://github.com/actions/toolkit/tree/main/packages/io | homepage: https://github.com/actions/toolkit/tree/main/packages/io | ||||||
|  | |||||||
							
								
								
									
										18
									
								
								CHANGELOG.md
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								CHANGELOG.md
									
									
									
									
									
								
							| @ -1,23 +1,5 @@ | |||||||
| # Changelog | # Changelog | ||||||
|  |  | ||||||
| ## v3.4.0 |  | ||||||
| - [Upgrade codeql actions to v2](https://github.com/actions/checkout/pull/1209) |  | ||||||
| - [Upgrade dependencies](https://github.com/actions/checkout/pull/1210) |  | ||||||
| - [Upgrade @actions/io](https://github.com/actions/checkout/pull/1225) |  | ||||||
|  |  | ||||||
| ## v3.3.0 |  | ||||||
| - [Implement branch list using callbacks from exec function](https://github.com/actions/checkout/pull/1045) |  | ||||||
| - [Add in explicit reference to private checkout options](https://github.com/actions/checkout/pull/1050) |  | ||||||
| - [Fix comment typos (that got added in #770)](https://github.com/actions/checkout/pull/1057) |  | ||||||
|  |  | ||||||
| ## v3.2.0 |  | ||||||
| - [Add GitHub Action to perform release](https://github.com/actions/checkout/pull/942) |  | ||||||
| - [Fix status badge](https://github.com/actions/checkout/pull/967) |  | ||||||
| - [Replace datadog/squid with ubuntu/squid Docker image](https://github.com/actions/checkout/pull/1002) |  | ||||||
| - [Wrap pipeline commands for submoduleForeach in quotes](https://github.com/actions/checkout/pull/964) |  | ||||||
| - [Update @actions/io to 1.1.2](https://github.com/actions/checkout/pull/1029) |  | ||||||
| - [Upgrading version to 3.2.0](https://github.com/actions/checkout/pull/1039) |  | ||||||
|  |  | ||||||
| ## v3.1.0 | ## v3.1.0 | ||||||
| - [Use @actions/core `saveState` and `getState`](https://github.com/actions/checkout/pull/939) | - [Use @actions/core `saveState` and `getState`](https://github.com/actions/checkout/pull/939) | ||||||
| - [Add `github-server-url` input](https://github.com/actions/checkout/pull/922) | - [Add `github-server-url` input](https://github.com/actions/checkout/pull/922) | ||||||
|  | |||||||
							
								
								
									
										76
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										76
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							| @ -330,7 +330,7 @@ class GitAuthHelper { | |||||||
|             if (this.settings.sshKnownHosts) { |             if (this.settings.sshKnownHosts) { | ||||||
|                 knownHosts += `# Begin from input known hosts\n${this.settings.sshKnownHosts}\n# end from input known hosts\n`; |                 knownHosts += `# Begin from input known hosts\n${this.settings.sshKnownHosts}\n# end from input known hosts\n`; | ||||||
|             } |             } | ||||||
|             knownHosts += `# Begin implicitly added github.com\ngithub.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=\n# End implicitly added github.com\n`; |             knownHosts += `# Begin implicitly added github.com\ngithub.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==\n# End implicitly added github.com\n`; | ||||||
|             this.sshKnownHostsPath = path.join(runnerTemp, `${uniqueId}_known_hosts`); |             this.sshKnownHostsPath = path.join(runnerTemp, `${uniqueId}_known_hosts`); | ||||||
|             stateHelper.setSshKnownHostsPath(this.sshKnownHostsPath); |             stateHelper.setSshKnownHostsPath(this.sshKnownHostsPath); | ||||||
|             yield fs.promises.writeFile(this.sshKnownHostsPath, knownHosts); |             yield fs.promises.writeFile(this.sshKnownHostsPath, knownHosts); | ||||||
| @ -6552,17 +6552,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge | |||||||
| }; | }; | ||||||
| var _a; | var _a; | ||||||
| Object.defineProperty(exports, "__esModule", ({ value: true })); | Object.defineProperty(exports, "__esModule", ({ value: true })); | ||||||
| exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.READONLY = exports.UV_FS_O_EXLOCK = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rm = exports.rename = exports.readlink = exports.readdir = exports.open = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0; | exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rename = exports.readlink = exports.readdir = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0; | ||||||
| const fs = __importStar(__nccwpck_require__(7147)); | const fs = __importStar(__nccwpck_require__(7147)); | ||||||
| const path = __importStar(__nccwpck_require__(1017)); | const path = __importStar(__nccwpck_require__(1017)); | ||||||
| _a = fs.promises | _a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; | ||||||
| // export const {open} = 'fs'
 |  | ||||||
| , exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.open = _a.open, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rm = _a.rm, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; |  | ||||||
| // export const {open} = 'fs'
 |  | ||||||
| exports.IS_WINDOWS = process.platform === 'win32'; | exports.IS_WINDOWS = process.platform === 'win32'; | ||||||
| // See https://github.com/nodejs/node/blob/d0153aee367422d0858105abec186da4dff0a0c5/deps/uv/include/uv/win.h#L691
 |  | ||||||
| exports.UV_FS_O_EXLOCK = 0x10000000; |  | ||||||
| exports.READONLY = fs.constants.O_RDONLY; |  | ||||||
| function exists(fsPath) { | function exists(fsPath) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         try { |         try { | ||||||
| @ -6743,8 +6737,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge | |||||||
| Object.defineProperty(exports, "__esModule", ({ value: true })); | Object.defineProperty(exports, "__esModule", ({ value: true })); | ||||||
| exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0; | exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0; | ||||||
| const assert_1 = __nccwpck_require__(9491); | const assert_1 = __nccwpck_require__(9491); | ||||||
|  | const childProcess = __importStar(__nccwpck_require__(2081)); | ||||||
| const path = __importStar(__nccwpck_require__(1017)); | const path = __importStar(__nccwpck_require__(1017)); | ||||||
|  | const util_1 = __nccwpck_require__(3837); | ||||||
| const ioUtil = __importStar(__nccwpck_require__(1962)); | const ioUtil = __importStar(__nccwpck_require__(1962)); | ||||||
|  | const exec = util_1.promisify(childProcess.exec); | ||||||
|  | const execFile = util_1.promisify(childProcess.execFile); | ||||||
| /** | /** | ||||||
|  * Copies a file or folder. |  * Copies a file or folder. | ||||||
|  * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js
 |  * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js
 | ||||||
| @ -6825,23 +6823,61 @@ exports.mv = mv; | |||||||
| function rmRF(inputPath) { | function rmRF(inputPath) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         if (ioUtil.IS_WINDOWS) { |         if (ioUtil.IS_WINDOWS) { | ||||||
|  |             // Node doesn't provide a delete operation, only an unlink function. This means that if the file is being used by another
 | ||||||
|  |             // program (e.g. antivirus), it won't be deleted. To address this, we shell out the work to rd/del.
 | ||||||
|             // Check for invalid characters
 |             // Check for invalid characters
 | ||||||
|             // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
 |             // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
 | ||||||
|             if (/[*"<>|]/.test(inputPath)) { |             if (/[*"<>|]/.test(inputPath)) { | ||||||
|                 throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); |                 throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); | ||||||
|             } |             } | ||||||
|  |             try { | ||||||
|  |                 const cmdPath = ioUtil.getCmdPath(); | ||||||
|  |                 if (yield ioUtil.isDirectory(inputPath, true)) { | ||||||
|  |                     yield exec(`${cmdPath} /s /c "rd /s /q "%inputPath%""`, { | ||||||
|  |                         env: { inputPath } | ||||||
|  |                     }); | ||||||
|  |                 } | ||||||
|  |                 else { | ||||||
|  |                     yield exec(`${cmdPath} /s /c "del /f /a "%inputPath%""`, { | ||||||
|  |                         env: { inputPath } | ||||||
|  |                     }); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             catch (err) { | ||||||
|  |                 // if you try to delete a file that doesn't exist, desired result is achieved
 | ||||||
|  |                 // other errors are valid
 | ||||||
|  |                 if (err.code !== 'ENOENT') | ||||||
|  |                     throw err; | ||||||
|  |             } | ||||||
|  |             // Shelling out fails to remove a symlink folder with missing source, this unlink catches that
 | ||||||
|  |             try { | ||||||
|  |                 yield ioUtil.unlink(inputPath); | ||||||
|  |             } | ||||||
|  |             catch (err) { | ||||||
|  |                 // if you try to delete a file that doesn't exist, desired result is achieved
 | ||||||
|  |                 // other errors are valid
 | ||||||
|  |                 if (err.code !== 'ENOENT') | ||||||
|  |                     throw err; | ||||||
|  |             } | ||||||
|         } |         } | ||||||
|         try { |         else { | ||||||
|             // note if path does not exist, error is silent
 |             let isDir = false; | ||||||
|             yield ioUtil.rm(inputPath, { |             try { | ||||||
|                 force: true, |                 isDir = yield ioUtil.isDirectory(inputPath); | ||||||
|                 maxRetries: 3, |             } | ||||||
|                 recursive: true, |             catch (err) { | ||||||
|                 retryDelay: 300 |                 // if you try to delete a file that doesn't exist, desired result is achieved
 | ||||||
|             }); |                 // other errors are valid
 | ||||||
|         } |                 if (err.code !== 'ENOENT') | ||||||
|         catch (err) { |                     throw err; | ||||||
|             throw new Error(`File was unable to be removed ${err}`); |                 return; | ||||||
|  |             } | ||||||
|  |             if (isDir) { | ||||||
|  |                 yield execFile(`rm`, [`-rf`, `${inputPath}`]); | ||||||
|  |             } | ||||||
|  |             else { | ||||||
|  |                 yield ioUtil.unlink(inputPath); | ||||||
|  |             } | ||||||
|         } |         } | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
|  | |||||||
| @ -247,7 +247,7 @@ class GitAuthHelper { | |||||||
|     if (this.settings.sshKnownHosts) { |     if (this.settings.sshKnownHosts) { | ||||||
|       knownHosts += `# Begin from input known hosts\n${this.settings.sshKnownHosts}\n# end from input known hosts\n` |       knownHosts += `# Begin from input known hosts\n${this.settings.sshKnownHosts}\n# end from input known hosts\n` | ||||||
|     } |     } | ||||||
|     knownHosts += `# Begin implicitly added github.com\ngithub.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=\n# End implicitly added github.com\n` |     knownHosts += `# Begin implicitly added github.com\ngithub.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==\n# End implicitly added github.com\n` | ||||||
|     this.sshKnownHostsPath = path.join(runnerTemp, `${uniqueId}_known_hosts`) |     this.sshKnownHostsPath = path.join(runnerTemp, `${uniqueId}_known_hosts`) | ||||||
|     stateHelper.setSshKnownHostsPath(this.sshKnownHostsPath) |     stateHelper.setSshKnownHostsPath(this.sshKnownHostsPath) | ||||||
|     await fs.promises.writeFile(this.sshKnownHostsPath, knownHosts) |     await fs.promises.writeFile(this.sshKnownHostsPath, knownHosts) | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	