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