Skip to content

Commit

Permalink
Add commit message
Browse files Browse the repository at this point in the history
Signed-off-by: Omer Aplatony <[email protected]>
  • Loading branch information
omerap12 committed Sep 10, 2024
1 parent 777684d commit 1236d88
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ none_string_token=${NONE_STRING_TOKEN:-#none}
branch_history=${BRANCH_HISTORY:-compare}
force_without_changes=${FORCE_WITHOUT_CHANGES:-false}
force_without_changes_pre=${FORCE_WITHOUT_CHANGES:-false}
tag_message=${TAG_MESSAGE:-""}

# since https://github.blog/2022-04-12-git-security-vulnerability-announced/ runner uses?
git config --global --add safe.directory /github/workspace
Expand Down Expand Up @@ -50,6 +51,7 @@ echo -e "\tNONE_STRING_TOKEN: ${none_string_token}"
echo -e "\tBRANCH_HISTORY: ${branch_history}"
echo -e "\tFORCE_WITHOUT_CHANGES: ${force_without_changes}"
echo -e "\tFORCE_WITHOUT_CHANGES_PRE: ${force_without_changes_pre}"
echo -e "\tTAG_MESSAGE: ${tag_message}"

# verbose, show everything
if $verbose
Expand Down Expand Up @@ -245,9 +247,16 @@ then
exit 0
fi

echo "EVENT: creating local tag $new"
# create local git tag
git tag -f "$new" || exit 1
# Modify the tag creation part
if [ -n "$tag_message" ]
then
echo "EVENT: creating local tag $new with message: $tag_message"
git tag -a "$new" -m "$tag_message" || exit 1
else
echo "EVENT: creating local tag $new"
git tag -f "$new" || exit 1
fi

echo "EVENT: pushing tag $new to origin"

if $git_api_tagging
Expand Down

0 comments on commit 1236d88

Please sign in to comment.