52 lines
1.7 KiB
YAML
52 lines
1.7 KiB
YAML
name: Branch Names
|
|
description: Retrieve github branch or tag information without the /ref/* prefix
|
|
author: David Hiendl
|
|
inputs:
|
|
strip_tag_prefix:
|
|
description: 'The prefix that should be stripped from the tag e.g `v` -> with a tag `v0.0.1` -> returns `0.0.1`'
|
|
default: ""
|
|
required: false
|
|
|
|
outputs:
|
|
git_is_default:
|
|
description: 'Returns `"true"` if the current branch is the default else `"false"`.'
|
|
git_is_tag:
|
|
description: 'Returns `"true"` if the current branch is a tag else `"false"`.'
|
|
git_is_branch:
|
|
description: 'Returns `"true"` if action is executed for a branch (not Tag, not PR), else `"false"`.'
|
|
git_default_branch:
|
|
description: 'The default branch name e.g `main` OR `master`'
|
|
git_current_branch:
|
|
description: 'The current branch name regardless of event_type e.g `main`, `feature/test`'
|
|
git_base_ref_branch:
|
|
description: 'The target branch of a pull request or tag e.g `main`'
|
|
git_head_ref_branch:
|
|
description: 'The source branch of a pull request e.g `feature/test`'
|
|
git_ref_branch:
|
|
description: 'The branch that triggered the workflow run. e.g `1/merge`, `main`'
|
|
git_tag:
|
|
description: 'The tag that triggered the workflow run. e.g `v0.0.1`, `0.0.1`'
|
|
|
|
ci_hostname:
|
|
description: 'ci server hostname without http(s) prefix'
|
|
|
|
semver_valid:
|
|
description: "Flag indicating if the semver version parsed from a tag is valid"
|
|
semver_major:
|
|
description: "Semver major version"
|
|
semver_minor:
|
|
description: "Semver minor version"
|
|
semver_patch:
|
|
description: "Semver patch version"
|
|
semver_build:
|
|
description: "Semver build string"
|
|
semver_pre:
|
|
description: "Semver pre-release version"
|
|
|
|
runs:
|
|
using: "node20"
|
|
main: ./dist/index.js
|
|
|
|
branding:
|
|
icon: git-branch
|
|
color: white |