Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Jul 5, 2021
1 parent 962fee1 commit 6eb68d6
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,6 @@ Get branch or tag information without the `/ref/*` prefix
* [`macos-*`](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on)
* [`windows-*`](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on)

## Outputs

| Output | type | Example | Description |
|:--------------------:|:------------:|:---------------------------:|:-----------------------------------------------------------------:|
| is_default | `boolean` | `true` *OR* `false` | Detects wheter the workflow is running on a default branch |
| is_tag | `boolean` | `true` *OR* `false` | Detects wheter the workflow is running on a tag branch |
| current_branch | `string` | `main` *OR* `feature/test` | Always returns a valid branch name for a triggered workflow run. |
| base_ref_branch | `string` | `main` | The target branch of a pull request |
| head_ref_branch | `string` | `feature/test` | The source branch of a pull request |
| ref_branch | `string` | `1/merge` *OR* `main` | The branch that triggered the workflow run |
| tag | `string` | `v0.0.1` *OR* `0.0.1` | The tag that triggered the workflow run |

## Inputs

| Input | type | default | Description |
|:-----------------:|:---------:|:--------:|:-----------------------:|
| strip_tag_prefix | `string` | `''` | The tag prefix to strip <br> *i.e `v0.0.1` -> `v` -> `0.0.1`* |

## Usage

Expand Down Expand Up @@ -58,6 +41,25 @@ on:
# Outputs: "Running on pr: feature/test".
```

## Outputs

| Output | type | Example | Description |
|:--------------------:|:------------:|:---------------------------:|:-----------------------------------------------------------------:|
| is_default | `boolean` | `true` *OR* `false` | Detects wheter the workflow is running on a default branch |
| is_tag | `boolean` | `true` *OR* `false` | Detects wheter the workflow is running on a tag branch |
| current_branch | `string` | `main` *OR* `feature/test` | Always returns a valid branch name for a triggered workflow run. |
| base_ref_branch | `string` | `main` | The target branch of a pull request |
| head_ref_branch | `string` | `feature/test` | The source branch of a pull request |
| ref_branch | `string` | `1/merge` *OR* `main` | The branch that triggered the workflow run |
| tag | `string` | `v0.0.1` *OR* `0.0.1` | The tag that triggered the workflow run |

## Inputs

| Input | type | default | Description |
|:-----------------:|:---------:|:--------:|:-----------------------:|
| strip_tag_prefix | `string` | `''` | The tag prefix to strip <br> *i.e `v0.0.1` -> `v` -> `0.0.1`* |


## Examples

```yaml
Expand Down

0 comments on commit 6eb68d6

Please sign in to comment.