Skip to content

Commit 8b797ba

Browse files
committed
Fix tag clobbering
1 parent 1b11953 commit 8b797ba

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ The script will not stop if one of the git commands fails. E.g.: if your command
7070

7171
### Tagging:
7272

73-
You can tag commits with the `tag` option: when used, it will create a lightweight tag for the commit with the name you set as input. If not entered (or if an empty string is passed) teh action won't create any tag.
73+
You can tag commits with the `tag` option: when used, it will create a lightweight tag for the commit with the name you set as input. If not entered (or if an empty string is passed) teh action won't create any tag.
74+
If there is already a tag with the name you entered it will be overwritten, and so the tag will be "updated".
7475

7576
### Examples:
7677

src/entrypoint.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,11 @@ if ! git diff --cached --quiet --exit-code; then
7575
echo "Tagging commit..."
7676
tag
7777

78-
echo "Pushing to repo..."
79-
git push --set-upstream origin "$INPUT_REF" --tags
78+
echo "Pushing commits to repo..."
79+
git push --set-upstream origin "$INPUT_REF"
80+
81+
echo "Pushing tags to repo..."
82+
git push --set-upstream origin "$INPUT_REF" --force --tags
8083

8184
echo "::endgroup::"
8285
echo "Task completed."

0 commit comments

Comments
 (0)