diff --git a/README.md b/README.md index 9ca3446..ee742ec 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,17 @@ Get branch information without the `/ref/*` prefix | ref_branch | `string` | `1/merge` | The branch that triggered the workflow run | +Possible usage with [actions/checkout@v2](https://github.com/actions/checkout): + +```yaml + - name: Get branch names. + id: branch-names + uses: tj-actions/branch-names@v1 + - uses: actions/checkout@v2 + with: + ref: ${{ steps.branch-names.outputs.base_ref_branch }} +``` + * Free software: [MIT license](LICENSE)