fix(ci): force-update API subtag on re-runs

Always force-create and force-push the API submodule tag so it stays
in sync with the main version tag, even when re-tagging.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
This commit is contained in:
Andrei Kvapil 2026-03-31 13:15:47 +02:00
parent 83b8940024
commit 38b5d86017
No known key found for this signature in database
GPG key ID: 931CF7FEACEAF765

View file

@ -136,12 +136,8 @@ jobs:
git config user.email "217169706+cozystack-bot@users.noreply.github.com"
git remote set-url origin https://cozystack-bot:${GH_PAT}@github.com/${GITHUB_REPOSITORY}
TARGET="$(git rev-parse "${VTAG}^{}")"
if git rev-parse -q --verify "refs/tags/${SUBTAG}" >/dev/null; then
test "$(git rev-list -n1 "${SUBTAG}")" = "$TARGET"
else
git tag "${SUBTAG}" "$TARGET"
fi
git push origin "refs/tags/${SUBTAG}" 2>&1 || echo "Tag ${SUBTAG} already exists on remote"
git tag -f "${SUBTAG}" "$TARGET"
git push -f origin "refs/tags/${SUBTAG}"
# Create or reuse draft release
- name: Create / reuse draft release