mirror of
https://github.com/rlespinasse/github-slug-action.git
synced 2026-06-30 01:46:42 +00:00
feat(short_sha): add a shortened sha commit id
This commit is contained in:
committed by
Romain Lespinasse
parent
3876a4c025
commit
d77acd4f47
@@ -7,6 +7,12 @@ slug_ref() {
|
||||
| cut -c1-63
|
||||
}
|
||||
|
||||
short_sha(){
|
||||
echo "$1" \
|
||||
| cut -c1-8
|
||||
}
|
||||
|
||||
echo ::set-env name=GITHUB_REF_SLUG::"$(slug_ref "$GITHUB_REF")"
|
||||
echo ::set-env name=GITHUB_HEAD_REF_SLUG::"$(slug_ref "$GITHUB_HEAD_REF")"
|
||||
echo ::set-env name=GITHUB_BASE_REF_SLUG::"$(slug_ref "$GITHUB_BASE_REF")"
|
||||
echo ::set-env name=GITHUB_SHA_SHORT::"$(short_sha "$GITHUB_SHA")"
|
||||
|
||||
Reference in New Issue
Block a user