From c80e647ed1fe652d5aff55316593fc87155bb82f Mon Sep 17 00:00:00 2001 From: "J. Smeets" Date: Wed, 8 Jul 2020 09:20:55 +0200 Subject: [PATCH] Explicitly delete / recreate tag instead of updating --- entrypoint.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 08170d4..c7564b1 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -21,8 +21,10 @@ EOF echo "Setting up git machine..." git_setup -echo "Forcing tag update..." -git tag -a ${1} -m "${2}" "${GITHUB_SHA}" -f +echo "Deleting old tag..." +git tag -d ${1} || true +git push origin :refs/tags/${1} -echo "Forcing tag push..." -git push -f origin refs/tags/${1} \ No newline at end of file +echo "Creating new tag..." +git tag -a ${1} -m "${2}" "${GITHUB_SHA}" +git push origin refs/tags/${1} \ No newline at end of file