mirror of
				https://github.com/actions/checkout.git
				synced 2025-10-31 01:58:36 +08:00 
			
		
		
		
	.
This commit is contained in:
		
							parent
							
								
									61785bc290
								
							
						
					
					
						commit
						4c4bd2f813
					
				|  | @ -136,12 +136,15 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous | ||||||
| ```yaml | ```yaml | ||||||
| - name: Checkout | - name: Checkout | ||||||
|   uses: actions/checkout@v2 |   uses: actions/checkout@v2 | ||||||
|  |   with: | ||||||
|  |     path: main | ||||||
| 
 | 
 | ||||||
| - name: Checkout private tools | - name: Checkout private tools | ||||||
|   uses: actions/checkout@v2 |   uses: actions/checkout@v2 | ||||||
|   with: |   with: | ||||||
|     repository: my-org/my-private-tools |     repository: my-org/my-private-tools | ||||||
|     token: ${{ secrets.GitHub_PAT }} # `GitHub_PAT` is a secret that contains your PAT |     token: ${{ secrets.GitHub_PAT }} # `GitHub_PAT` is a secret that contains your PAT | ||||||
|  |     path: my-tools | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| > - `${{ github.token }}` is scoped to the current repository, so if you want to checkout a different repository that is private you will need to provide your own [PAT](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line). | > - `${{ github.token }}` is scoped to the current repository, so if you want to checkout a different repository that is private you will need to provide your own [PAT](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line). | ||||||
|  | @ -160,8 +163,7 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous | ||||||
| ```yaml | ```yaml | ||||||
| on: | on: | ||||||
|   pull_request: |   pull_request: | ||||||
|     branches: |     branches: [master] | ||||||
|     - master |  | ||||||
|     types: [opened, synchronize, closed] |     types: [opened, synchronize, closed] | ||||||
| jobs: | jobs: | ||||||
|   build: |   build: | ||||||
|  | @ -174,7 +176,8 @@ jobs: | ||||||
| 
 | 
 | ||||||
| ```yaml | ```yaml | ||||||
| - uses: actions/checkout@v2 | - uses: actions/checkout@v2 | ||||||
| - shell: bash | - name: Checkout submodules | ||||||
|  |   shell: bash | ||||||
|   run: | |   run: | | ||||||
|     auth_header="$(git config --local --get http.https://github.com/.extraheader)" |     auth_header="$(git config --local --get http.https://github.com/.extraheader)" | ||||||
|     git submodule sync --recursive |     git submodule sync --recursive | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 eric sciple
						eric sciple