Slim action to hash the branch name of your pull request.
You can for example use the branch name to spawn an environment for you branch with the hash as an identifier (e.g. 389WKUDHFNFE.testsystem.mydomain.com
)
Required The branch name from the github environment variables.
Optional The desired ouput length of the generated hash. Must be at least 1. Default "none"
.
Optional Desired encoding choose between "base64"
and "hex"
. Default "hex"
.
Optional If the output should be uppercased. Default false
.
Ouputs a hashed version of your branch name:
"feature-1" --> 389WKUDHFNFE
uses: felix-schaipp/hash-branch-name@main
with:
branch-name: ${GITHUB_HEAD_REF}
output-length: 12
uppercase: true
uses: felix-schaipp/hash-branch-name@main
with:
output-length: '12'
uses: felix-schaipp/hash-branch-name@main
with:
encoding: 'base64'
uses: felix-schaipp/hash-branch-name@main
with:
uppercase: true