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

Skip if there are no new commits in pre-release re runs #234

Merged
merged 1 commit into from Jan 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 11 additions & 2 deletions entrypoint.sh
Expand Up @@ -114,10 +114,9 @@ fi

# get current commit hash for tag
tag_commit=$(git rev-list -n 1 "$tag")

# get current commit hash
commit=$(git rev-parse HEAD)

# skip if there are no new commits for non-pre_release
if [ "$tag_commit" == "$commit" ]
then
echo "No new commits since previous tag. Skipping..."
Expand Down Expand Up @@ -159,6 +158,16 @@ esac

if $pre_release
then
# get current commit hash for tag
pre_tag_commit=$(git rev-list -n 1 "$pre_tag")
# skip if there are no new commits for pre_release
if [ "$pre_tag_commit" == "$commit" ]
then
echo "No new commits since previous pre_tag. Skipping..."
setOutput "new_tag" "$pre_tag"
setOutput "tag" "$pre_tag"
exit 0
fi
# already a pre-release available, bump it
if [[ "$pre_tag" =~ $new ]] && [[ "$pre_tag" =~ $suffix ]]
then
Expand Down