mirror of
				https://github.com/actions/checkout.git
				synced 2025-10-31 10:08:37 +08:00 
			
		
		
		
	add docs about checking out the triggering ref
This commit is contained in:
		
							parent
							
								
									a14471d838
								
							
						
					
					
						commit
						c176d89032
					
				
							
								
								
									
										11
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								README.md
									
									
									
									
									
								
							|  | @ -10,6 +10,7 @@ See [here](https://help.github.com/en/articles/events-that-trigger-workflows) to | |||
| See [action.yml](action.yml) | ||||
| 
 | ||||
| Basic: | ||||
| 
 | ||||
| ```yaml | ||||
| steps: | ||||
| - uses: actions/checkout@master | ||||
|  | @ -20,6 +21,16 @@ steps: | |||
| - run: npm test | ||||
| ``` | ||||
| 
 | ||||
| To check out the branch or tag ref that triggered the workflow run: | ||||
| 
 | ||||
| ```yaml | ||||
| - uses: actions/checkout@master | ||||
|   with: | ||||
|     ref: ${{ github.ref }} | ||||
| ``` | ||||
| 
 | ||||
| For more details, see [Contexts and expression syntax for GitHub Actions](https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions) | ||||
| 
 | ||||
| # License | ||||
| 
 | ||||
| The scripts and documentation in this project are released under the [MIT License](LICENSE) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Zeke Sikelianos
						Zeke Sikelianos