Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to pass tag from another action #3

Merged
merged 16 commits into from
Dec 6, 2019
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ inputs:
required: false
created_tag:
description: "Allows to pass an already created tag, forces update_existing to true."
default: "false"
default: ""
required: false
release_title:
description: "Allows to pass a title for the release."
Expand Down
13 changes: 6 additions & 7 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,12 @@ fi
set -euo pipefail

set_tag() {
if [ "${INPUT_CREATED_TAG}" == "false" ];
then
TAG="$(echo ${GITHUB_REF} | grep tags | grep -o "[^/]*$" || true)";
else
TAG=${INPUT_CREATED_TAG};
INPUT_UPDATE_EXISTING="true"
fi
if [ -n "${INPUT_CREATED_TAG}" ]; then
TAG=${INPUT_CREATED_TAG}
INPUT_UPDATE_EXISTING="true"
Roang-zero1 marked this conversation as resolved.
Show resolved Hide resolved
else
TAG="$(echo ${GITHUB_REF} | grep tags | grep -o "[^/]*$" || true)"
fi
}

create_release_data() {
Expand Down