From 58f69047b6d511c194a588ed89b90ab228bcc957 Mon Sep 17 00:00:00 2001 From: peaceiris <30958501+peaceiris@users.noreply.github.com> Date: Mon, 13 Jan 2020 00:34:43 +0900 Subject: [PATCH] feat: Add tagName and tagMessage options Close #76 --- action.yml | 6 ++++++ entrypoint.sh | 9 +++++++++ 2 files changed, 15 insertions(+) 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"