0
0
Fork 0
mirror of https://github.com/actions/checkout.git synced 2024-11-27 00:26:20 +01:00

pr head commit scenario

This commit is contained in:
eric sciple 2019-12-03 18:12:12 -05:00
parent 4817b449b0
commit e9fadf668a

View file

@ -66,7 +66,7 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous
## Checkout a different branch
```yaml
- uses: actions/checkout@preview
- uses: actions/checkout@v2-beta
with:
ref: some-branch
```
@ -74,7 +74,7 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous
## Checkout a different, private repository
```yaml
- uses: actions/checkout@preview
- uses: actions/checkout@v2-beta
with:
repository: myAccount/myRepository
ref: refs/heads/master
@ -82,6 +82,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).
## Checkout the HEAD commit of a PR, rather than the merge commit
```yaml
- uses: actions/checkout@v2-beta
with:
ref: refs/pull/${{ github.event.number }}/head
```
# License
The scripts and documentation in this project are released under the [MIT License](LICENSE)