Fix tag clobbering

This commit is contained in:
Federico Grandi
2020-05-17 18:26:13 +02:00
parent 1b11953688
commit 8b797ba126
2 changed files with 7 additions and 3 deletions

View File

@@ -70,7 +70,8 @@ The script will not stop if one of the git commands fails. E.g.: if your command
### 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:

View File

@@ -75,8 +75,11 @@ if ! git diff --cached --quiet --exit-code; then
echo "Tagging commit..."
tag
echo "Pushing to repo..."
git push --set-upstream origin "$INPUT_REF" --tags
echo "Pushing commits to repo..."
git push --set-upstream origin "$INPUT_REF"
echo "Pushing tags to repo..."
git push --set-upstream origin "$INPUT_REF" --force --tags
echo "::endgroup::"
echo "Task completed."