From c31823e981c6090a73136de47b61d4a3df397bfa Mon Sep 17 00:00:00 2001 From: Arlind Sulejmani Date: Sat, 7 Jun 2025 12:40:33 +0200 Subject: [PATCH] delete the latest tag if changes are to be found --- .gitea/workflows/deploy-ci.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/deploy-ci.yaml b/.gitea/workflows/deploy-ci.yaml index b708ca3..21ea256 100644 --- a/.gitea/workflows/deploy-ci.yaml +++ b/.gitea/workflows/deploy-ci.yaml @@ -98,10 +98,11 @@ jobs: if ! git diff --cached --quiet; then latest_tag=$(git describe --tags --abbrev=0 2>/dev/null || true) if [ -n "$latest_tag" ]; then - git tag -d "$latest_tag" || true + git push origin :refs/tags/$latest_tag -q || true + git tag -d "$latest_tag" -q || true fi - git commit -m "Update CI" - git push origin HEAD:main --tags --force + git commit -m "Update CI" -q + git push origin HEAD:main --tags --force -q echo " → Updated and pushed $owner/$repo" else echo " → No changes detected for $owner/$repo"