mirror of
				https://github.com/actions/checkout.git
				synced 2025-10-31 18:18:37 +08:00 
			
		
		
		
	Merge 8d25b321e9 into 2ff2fbdea4
				
					
				
			This commit is contained in:
		
						commit
						00cbf1c204
					
				
							
								
								
									
										10
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								README.md
									
									
									
									
									
								
							|  | @ -117,6 +117,7 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous | ||||||
| - [Checkout multiple repos (private)](#Checkout-multiple-repos-private) | - [Checkout multiple repos (private)](#Checkout-multiple-repos-private) | ||||||
| - [Checkout pull request HEAD commit instead of merge commit](#Checkout-pull-request-HEAD-commit-instead-of-merge-commit) | - [Checkout pull request HEAD commit instead of merge commit](#Checkout-pull-request-HEAD-commit-instead-of-merge-commit) | ||||||
| - [Checkout pull request on closed event](#Checkout-pull-request-on-closed-event) | - [Checkout pull request on closed event](#Checkout-pull-request-on-closed-event) | ||||||
|  | - [Fetch pull request base-ref in addition to merge commit (for diffing)](#Fetch-pull-request-base-ref-in-addition-to-merge-commit-for-diffing) | ||||||
| - [Fetch all tags](#Fetch-all-tags) | - [Fetch all tags](#Fetch-all-tags) | ||||||
| - [Fetch all branches](#Fetch-all-branches) | - [Fetch all branches](#Fetch-all-branches) | ||||||
| - [Fetch all history for all tags and branches](#Fetch-all-history-for-all-tags-and-branches) | - [Fetch all history for all tags and branches](#Fetch-all-history-for-all-tags-and-branches) | ||||||
|  | @ -207,6 +208,15 @@ jobs: | ||||||
|       - uses: actions/checkout@v2 |       - uses: actions/checkout@v2 | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
|  | ## Fetch pull request base-ref in addition to merge commit (for diffing) | ||||||
|  | 
 | ||||||
|  | ```yml | ||||||
|  | - uses: actions/checkout@v2 | ||||||
|  | - name: Fetch base_ref HEAD | ||||||
|  |   run: git fetch --depth=1 origin +refs/heads/${{github.base_ref}}:refs/remotes/origin/${{github.base_ref}} | ||||||
|  | - run: git diff origin/${{github.base_ref}}..HEAD | ||||||
|  | ``` | ||||||
|  | 
 | ||||||
| ## Fetch all tags | ## Fetch all tags | ||||||
| 
 | 
 | ||||||
| ```yaml | ```yaml | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Jason Karns
						Jason Karns