diff options
| author | eric sciple <ericsciple@users.noreply.github.com> | 2019-12-04 10:12:10 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-04 10:12:10 -0500 |
| commit | 9cd5836e75e1d4e738850839f9556d7976e83cbe (patch) | |
| tree | 510469c9136b5994da18429ae65cfff0c96ab1d3 | |
| parent | 0d5f671e74e98555f4f1e919cd88ed0191789585 (diff) | |
document scenario: checkout the head commit of a PR (#90)
| -rw-r--r-- | README.md | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -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: ${{ github.event.after }} +``` + # License The scripts and documentation in this project are released under the [MIT License](LICENSE) |
