actions-marketplace-validations/GitHub slug

GitHub Action to expose slug values of branch/tag/version inside your GitHub workflow

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Mar 1, 2026
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: actions-marketplace-validations/gacts_github-slug@256c85f4658dcec739b12b467c3a96522384e36c # no releases — HEAD as of 2026-07-10

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
to-slugSlugify this value (string)no
namedescription
slugA slugged version of "to-slug" input (string)
is-branchThe workflow was triggered on a branch ("true"|"false")
is-tagThe workflow was triggered on a tag ("true"|"false")
branch-nameCurrent branch name ("feature/Fix-Something" for example; only for runs on a branch)
branch-name-slugA slugged version of "branch-name" ("feature-fix-something" for example; only for runs on a branch)
tag-nameCurrent tag name ("Any-Tag" or "v1.2.3" for example; only for runs on tags)
tag-name-slugA slugged version of "tag-name" ("any-tag" or "v1.2.3" for example; only for runs on a tag)
commit-hashThe commit SHA hash that triggered the workflow ("ffac537e6cbbf934b08745a378932722df287a53" for example)
commit-hash-shortShort (7 first characters) commit SHA hash ("ffac537" for example)
versionCleared and slugged version value ("1.2.3-anything-else" for example). Prefix "v|ver|version" will be rejected. Available for builds on branches and tags (always non-empty)
version-majorMajor version ("0" by default, "3" while build on tag/branch "3.02.998")
version-minorMinor version ("0" by default, "2" while build on tag/branch "3.02.998")
version-patchPatch version ("0" by default, "998" while build on tag/branch "3.02.998")
version-semanticSemantic version value in format "MAJOR.MINOR.PATCH(-tag-suffix-or-branch-name)". Prefix "v|ver|version" will be rejected. Available for builds on branches and tags (always non-empty)