diff --git a/action.yml b/action.yml index b569493..250d6f6 100644 --- a/action.yml +++ b/action.yml @@ -29,3 +29,9 @@ inputs: commitMessage: description: 'Set custom commit message' required: false + tagName: + description: 'Set tag name' + required: false + tagMessage: + description: 'Set tag message' + required: false diff --git a/entrypoint.sh b/entrypoint.sh index 4efb3ad..789a3d4 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -142,4 +142,13 @@ else git push origin "${remote_branch}" fi +if [[ -n "${INPUT_TAGNAME}" ]]; then + if [[ -n "${INPUT_TAGMESSAGE}" ]]; then + git tag "${INPUT_TAGNAME}" -m "${INPUT_TAGMESSAGE}" + else + git tag "${INPUT_TAGNAME}" + fi + git push origin "${INPUT_TAGNAME}" +fi + print_info "${GITHUB_SHA} was successfully deployed"