Skip to content

Commit f278d49

Browse files
authored
Merge pull request #323 from omerap12/add-tag-message
Add tag message override
2 parents 777684d + 7a5eb51 commit f278d49

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

entrypoint.sh

+12-3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ none_string_token=${NONE_STRING_TOKEN:-#none}
2323
branch_history=${BRANCH_HISTORY:-compare}
2424
force_without_changes=${FORCE_WITHOUT_CHANGES:-false}
2525
force_without_changes_pre=${FORCE_WITHOUT_CHANGES:-false}
26+
tag_message=${TAG_MESSAGE:-""}
2627

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

5456
# verbose, show everything
5557
if $verbose
@@ -245,9 +247,16 @@ then
245247
exit 0
246248
fi
247249

248-
echo "EVENT: creating local tag $new"
249-
# create local git tag
250-
git tag -f "$new" || exit 1
250+
# Modify the tag creation part
251+
if [ -n "$tag_message" ]
252+
then
253+
echo "EVENT: creating local tag $new with message: $tag_message"
254+
git tag -a "$new" -m "$tag_message" || exit 1
255+
else
256+
echo "EVENT: creating local tag $new"
257+
git tag -f "$new" || exit 1
258+
fi
259+
251260
echo "EVENT: pushing tag $new to origin"
252261

253262
if $git_api_tagging

0 commit comments

Comments
 (0)