mirror of
				https://github.com/actions/checkout.git
				synced 2025-11-04 14:48:39 +08:00 
			
		
		
		
	improve summary
This commit is contained in:
		
							parent
							
								
									c85684db76
								
							
						
					
					
						commit
						a8ee10b16b
					
				
							
								
								
									
										19
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								README.md
									
									
									
									
									
								
							| 
						 | 
					@ -4,29 +4,28 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Checkout V2
 | 
					# 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`.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
By default, the repository that triggered the workflow is checked-out, for the ref/SHA that triggered the event.
 | 
					Only a single commit is fetched, for the ref/SHA that triggered the workflow. Use the input `fetch-depth` for more control. Refer [here](https://help.github.com/en/articles/events-that-trigger-workflows) to learn which commit `$GITHUB_SHA` points to for different events.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Refer [here](https://help.github.com/en/articles/events-that-trigger-workflows) to learn which commit `$GITHUB_SHA` points to for different events.
 | 
					The auth token is persisted in the local git config. This enables your scripts to run authenticated git commands. The token is removed during post-job cleanup. Use the input `persist-credentials` to opt-out.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					When Git 2.18 or higher is not in your PATH, falls back to the REST API to download the files.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# What's new
 | 
					# What's new
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- Improved fetch performance
 | 
					- Improved performance
 | 
				
			||||||
  - The default behavior now fetches only the commit being checked-out
 | 
					  - Fetches only a single commit by default
 | 
				
			||||||
- Script authenticated git commands
 | 
					- Script authenticated git commands
 | 
				
			||||||
  - Persists the input `token` in the local git config
 | 
					  - Auth token persisted in the local git config
 | 
				
			||||||
  - Enables your scripts to run authenticated git commands
 | 
					 | 
				
			||||||
  - Post-job cleanup removes the token
 | 
					 | 
				
			||||||
  - Opt out by setting the input `persist-credentials: false`
 | 
					 | 
				
			||||||
- Creates a local branch
 | 
					- Creates a local branch
 | 
				
			||||||
  - No longer detached HEAD when checking out a branch
 | 
					  - No longer detached HEAD when checking out a branch
 | 
				
			||||||
  - A local branch is created with the corresponding upstream branch set
 | 
					 | 
				
			||||||
- Improved layout
 | 
					- Improved layout
 | 
				
			||||||
  - The input `path` is always relative to $GITHUB_WORKSPACE
 | 
					  - The input `path` is always relative to $GITHUB_WORKSPACE
 | 
				
			||||||
  - Aligns better with container actions, where $GITHUB_WORKSPACE gets mapped in
 | 
					  - Aligns better with container actions, where $GITHUB_WORKSPACE gets mapped in
 | 
				
			||||||
- Fallback to REST API download
 | 
					- 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 Git 2.18 or higher is not in the PATH, the REST API will be used to download the files
 | 
				
			||||||
 | 
					  - Note, when using a job container the action now runs in your container and not on the host
 | 
				
			||||||
- Removed input `submodules`
 | 
					- Removed input `submodules`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous versions.
 | 
					Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous versions.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user