From c176d890323908c279574afe155790ea443b921e Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Sat, 24 Aug 2019 08:50:09 -0700 Subject: [PATCH] add docs about checking out the triggering ref --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index d847f7c..d512b64 100644 --- a/README.md +++ b/README.md @@ -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 ``` +To check out the branch or tag ref that triggered the workflow run: + +```yaml +- uses: actions/checkout@master + with: + ref: ${{ github.ref }} +``` + +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)