step-security/Branch Names
Retrieve GitHub branch or tag information without the /ref/* prefix
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| strip_tag_prefix | The prefix that should be stripped from the tag e.g. `v` -> with a tag `v0.0.1` -> returns `0.0.1` | no | "" |
| strip_branch_prefix | The prefix that should be stripped from the branch e.g. `release/` -> with a branch `release/1.0` -> returns `1.0` | no | "" |
| replace_slashes_with_hyphens | Replace forward slashes with hyphens in branch names e.g. `feature/test` -> `feature-test` | no | false |
Outputs
| name | description |
|---|---|
| is_default | Returns `"true"` if the current branch is the default else `"false"`. |
| is_tag | Returns `"true"` if the current branch is a tag else `"false"`. |
| default_branch | The default branch name e.g `main` OR `master` |
| current_branch | The current branch name regardless of event_type e.g `main`, `feature/test` |
| base_ref_branch | The target branch of a pull request or tag e.g `main` |
| head_ref_branch | The source branch of a pull request e.g `feature/test` |
| ref_branch | The branch that triggered the workflow run. e.g `1/merge`, `main` |
| tag | The tag that triggered the workflow run. e.g `v0.0.1`, `0.0.1` |