1
0
Fork 0
mirror of https://code.forgejo.org/actions/checkout.git synced 2024-12-27 10:42:06 +01:00

add docs about checking out the triggering ref (#21)

* add docs about checking out the triggering ref

* clarify checkout behavior
This commit is contained in:
Zeke Sikelianos 2019-09-05 08:42:49 -07:00 committed by Tingluo Huang
parent a14471d838
commit 0963d3b35f

View file

@ -10,6 +10,7 @@ See [here](https://help.github.com/en/articles/events-that-trigger-workflows) to
See [action.yml](action.yml) See [action.yml](action.yml)
Basic: Basic:
```yaml ```yaml
steps: steps:
- uses: actions/checkout@master - uses: actions/checkout@master
@ -20,6 +21,16 @@ steps:
- run: npm test - run: npm test
``` ```
By default, the branch or tag ref that triggered the workflow will be checked out. If you wish to check out a different branch, specify that using `with.ref`:
```yaml
- uses: actions/checkout@master
with:
ref: some-branch
```
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 # 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)