Commit 0963d3b3 authored by Zeke Sikelianos's avatar Zeke Sikelianos Committed by Tingluo Huang
Browse files

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

* add docs about checking out the triggering ref

* clarify checkout behavior
parent a14471d8
Loading
Loading
Loading
Loading
+11
Changes for README.md: 11 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ See [here](https://help.github.com/en/articles/events-that-trigger-workflows) to
See [action.yml](action.yml)

Basic:

```yaml
steps:
- uses: actions/checkout@master
@@ -20,6 +21,16 @@ steps:
- 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

The scripts and documentation in this project are released under the [MIT License](LICENSE)