Compare commits
	
		
			3 Commits
		
	
	
		
			users/eric
			...
			5881116d18
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 5881116d18 | ||
|   | 7990b10a0c | ||
|   | 01a434328a | 
							
								
								
									
										20
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								README.md
									
									
									
									
									
								
							| @@ -10,7 +10,8 @@ By default, the repository that triggered the workflow is checked-out, for the r | |||||||
|  |  | ||||||
| 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. | ||||||
|  |  | ||||||
| Changes in V2: | # What's new | ||||||
|  |  | ||||||
| - Improved fetch performance | - Improved fetch performance | ||||||
|   - The default behavior now fetches only the SHA being checked-out |   - The default behavior now fetches only the SHA being checked-out | ||||||
| - Script authenticated git commands | - Script authenticated git commands | ||||||
| @@ -38,8 +39,9 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous | |||||||
|     # Default: ${{ github.repository }} |     # Default: ${{ github.repository }} | ||||||
|     repository: '' |     repository: '' | ||||||
|  |  | ||||||
|     # Ref to checkout (SHA, branch, tag). For the repository that triggered the |     # The branch, tag or SHA to checkout.  When checking out the repository that | ||||||
|     # workflow, defaults to the ref/SHA for the event. Otherwise defaults to master. |     # triggered a workflow, this defaults to the reference or SHA for that event. | ||||||
|  |     # Otherwise, defaults to `master`. | ||||||
|     ref: '' |     ref: '' | ||||||
|  |  | ||||||
|     # Access token for clone repository |     # Access token for clone repository | ||||||
| @@ -66,7 +68,7 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous | |||||||
| ## Checkout a different branch | ## Checkout a different branch | ||||||
|  |  | ||||||
| ```yaml | ```yaml | ||||||
| - uses: actions/checkout@preview | - uses: actions/checkout@v2-beta | ||||||
|   with: |   with: | ||||||
|     ref: some-branch |     ref: some-branch | ||||||
| ``` | ``` | ||||||
| @@ -74,7 +76,7 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous | |||||||
| ## Checkout a different, private repository | ## Checkout a different, private repository | ||||||
|  |  | ||||||
| ```yaml | ```yaml | ||||||
| - uses: actions/checkout@preview | - uses: actions/checkout@v2-beta | ||||||
|   with: |   with: | ||||||
|     repository: myAccount/myRepository |     repository: myAccount/myRepository | ||||||
|     ref: refs/heads/master |     ref: refs/heads/master | ||||||
| @@ -82,6 +84,14 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous | |||||||
| ``` | ``` | ||||||
| > - `${{ github.token }}` is scoped to the current repository, so if you want to checkout another 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 another 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). | ||||||
|  |  | ||||||
|  | ## Checkout the HEAD commit of a PR, rather than the merge commit | ||||||
|  |  | ||||||
|  | ```yaml | ||||||
|  | - uses: actions/checkout@v2-beta | ||||||
|  |   with: | ||||||
|  |     ref: ${{ github.event.after }} | ||||||
|  | ``` | ||||||
|  |  | ||||||
| # License | # License | ||||||
|  |  | ||||||
| The scripts and documentation in this project are released under the [MIT License](LICENSE) | The scripts and documentation in this project are released under the [MIT License](LICENSE) | ||||||
|   | |||||||
| @@ -1,13 +1,14 @@ | |||||||
| name: 'Checkout' | name: 'Checkout' | ||||||
| description: 'Checkout a Git repository' | description: 'Checkout a Git repository at a particular version' | ||||||
| inputs:  | inputs:  | ||||||
|   repository: |   repository: | ||||||
|     description: 'Repository name with owner. For example, actions/checkout' |     description: 'Repository name with owner. For example, actions/checkout' | ||||||
|     default: ${{ github.repository }} |     default: ${{ github.repository }} | ||||||
|   ref: |   ref: | ||||||
|     description: > |     description: > | ||||||
|       Ref to checkout (SHA, branch, tag). For the repository that triggered the |       The branch, tag or SHA to checkout.  When checking out the repository | ||||||
|       workflow, defaults to the ref/SHA for the event. Otherwise defaults to master. |       that triggered a workflow, this defaults to the reference or SHA for | ||||||
|  |       that event.  Otherwise, defaults to `master`. | ||||||
|   token: |   token: | ||||||
|     description: 'Access token for clone repository' |     description: 'Access token for clone repository' | ||||||
|     default: ${{ github.token }} |     default: ${{ github.token }} | ||||||
| @@ -25,4 +26,4 @@ inputs: | |||||||
| runs: | runs: | ||||||
|   using: node12 |   using: node12 | ||||||
|   main: dist/index.js |   main: dist/index.js | ||||||
|   post: dist/index.js |   post: dist/index.js | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user