Skip to content

Commit

Permalink
fixup! inputs ref
Browse files Browse the repository at this point in the history
  • Loading branch information
o-orand committed Jan 16, 2024
1 parent aff1c42 commit 418175f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 418175f

Please sign in to comment.