Fix tag clobbering
This commit is contained in:
@@ -70,7 +70,8 @@ The script will not stop if one of the git commands fails. E.g.: if your command
|
|||||||
|
|
||||||
### Tagging:
|
### Tagging:
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
If there is already a tag with the name you entered it will be overwritten, and so the tag will be "updated".
|
||||||
|
|
||||||
### Examples:
|
### Examples:
|
||||||
|
|
||||||
|
|||||||
@@ -75,8 +75,11 @@ if ! git diff --cached --quiet --exit-code; then
|
|||||||
echo "Tagging commit..."
|
echo "Tagging commit..."
|
||||||
tag
|
tag
|
||||||
|
|
||||||
echo "Pushing to repo..."
|
echo "Pushing commits to repo..."
|
||||||
git push --set-upstream origin "$INPUT_REF" --tags
|
git push --set-upstream origin "$INPUT_REF"
|
||||||
|
|
||||||
|
echo "Pushing tags to repo..."
|
||||||
|
git push --set-upstream origin "$INPUT_REF" --force --tags
|
||||||
|
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
echo "Task completed."
|
echo "Task completed."
|
||||||
|
|||||||
Reference in New Issue
Block a user