diff --git a/entrypoint.sh b/entrypoint.sh index 767e9d2..68dc7c7 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -15,9 +15,13 @@ elif [[ "$GITHUB_REF" == refs/pull/* ]]; then version=pr-${pull_number} release=false fi +echo "dir: $INPUT_DIR" +echo "override_existing: $INPUT_OVERRIDE_EXISTING" +echo "tag_name: $INPUT_TAG_NAME" +echo "target_branch: $INPUT_TARGET_BRANCH" -if [[ "$DIR" != "." ]];then - cd $DIR # We ensure we are in the right directory +if [[ "$INPUT_DIR" != "." ]];then + cd $INPUT_DIR # We ensure we are in the right directory fi echo "Current dir: $PWD" @@ -26,7 +30,7 @@ ls -l PUSH_OPTIONS="" -if [ "${OVERRIDE_EXISTING}" == "true" ];then +if [ "${INPUT_OVERRIDE_EXISTING}" == "true" ];then PUSH_OPTIONS="$PUSH_OPTIONS --force" fi @@ -83,7 +87,7 @@ if [ "${release}" == "true" ]; then git tag -a -m "cutting release ${version}" ${version} $PUSH_OPTIONS git pull --rebase ${remote_repo} - if [ "${OVERRIDE_EXISTING}" == "true" ] && git rev-parse "$version" >/dev/null 2>&1; then + if [ "${INPUT_OVERRIDE_EXISTING}" == "true" ] && git rev-parse "$version" >/dev/null 2>&1; then # Delete any existing release with same tag. Ignore push failure if no tag exists. git push --delete ${remote_repo} ${version} fi