Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee5987d184 | ||
|
|
0f98ab44f5 | ||
|
|
58f69047b6 |
10
action.yml
10
action.yml
@@ -29,3 +29,13 @@ inputs:
|
|||||||
commitMessage:
|
commitMessage:
|
||||||
description: 'Set custom commit message'
|
description: 'Set custom commit message'
|
||||||
required: false
|
required: false
|
||||||
|
tagName:
|
||||||
|
description: 'Set tag name'
|
||||||
|
required: false
|
||||||
|
tagMessage:
|
||||||
|
description: 'Set tag message'
|
||||||
|
required: false
|
||||||
|
tagOverwrite:
|
||||||
|
description: 'Enable overwriting tag'
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
|
|||||||
@@ -142,4 +142,22 @@ else
|
|||||||
git push origin "${remote_branch}"
|
git push origin "${remote_branch}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -n "${INPUT_TAGNAME}" ]]; then
|
||||||
|
print_info "Tag name: ${INPUT_TAGNAME}"
|
||||||
|
print_info "Tag message: ${INPUT_TAGMESSAGE}"
|
||||||
|
print_info "Tag overwrite: ${INPUT_TAGOVERWRITE}"
|
||||||
|
if [[ -n "${INPUT_TAGMESSAGE}" ]]; then
|
||||||
|
GIT_TAG_MESSAGE="${INPUT_TAGMESSAGE}"
|
||||||
|
else
|
||||||
|
GIT_TAG_MESSAGE="Deployment ${INPUT_TAGNAME}"
|
||||||
|
fi
|
||||||
|
if [[ "${INPUT_TAGOVERWRITE}" == "true" ]]; then
|
||||||
|
GIT_TAG_OPTION="--force"
|
||||||
|
else
|
||||||
|
GIT_TAG_OPTION=""
|
||||||
|
fi
|
||||||
|
git tag "${GIT_TAG_OPTION}" -a "${INPUT_TAGNAME}" -m "${GIT_TAG_MESSAGE}"
|
||||||
|
git push "${GIT_TAG_OPTION}" origin "${INPUT_TAGNAME}"
|
||||||
|
fi
|
||||||
|
|
||||||
print_info "${GITHUB_SHA} was successfully deployed"
|
print_info "${GITHUB_SHA} was successfully deployed"
|
||||||
|
|||||||
Reference in New Issue
Block a user