From 99be3860042ba430c41d43a0541e9d2c8b931449 Mon Sep 17 00:00:00 2001 From: Torsten Ueberschar Date: Sun, 18 Jan 2026 13:15:44 +0100 Subject: [PATCH] if tag exists return tag --- .github/actions/bump-version/action.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/actions/bump-version/action.yaml b/.github/actions/bump-version/action.yaml index 667621c..9a1e1f6 100644 --- a/.github/actions/bump-version/action.yaml +++ b/.github/actions/bump-version/action.yaml @@ -38,6 +38,13 @@ runs: id: bump shell: bash run: | + EXISTING_TAG="$(git tag --points-at HEAD "v*" | head -n 1)" + if [ -n "${EXISTING_TAG}" ]; then + echo "Tag ${EXISTING_TAG} already points at this commit; skipping bump." + echo "tag=${EXISTING_TAG}" >> "${GITHUB_OUTPUT}" + exit 0 + fi + REF="${GITHUB_REF:-${GITEA_REF}}" BRANCH="${REF#refs/heads/}" git fetch origin "${BRANCH}" --tags