1 Commits

Author SHA1 Message Date
adlee-was-taken
612eccf03b fix(ci): force-update tags on deploy fetch
All checks were successful
Build & Deploy Staging / build-and-deploy (release) Successful in 28s
git fetch origin won't replace a tag that already exists locally pointing
at a different commit. When v3.3.5 was force-moved on origin after a
first failed CI run, the staging runner kept the stale tag cached and
re-checked-out the old commit — the compose-env-wiring fix was never
actually applied and the container booted without LEADERBOARD_INCLUDE_TEST_DEFAULT.

--tags --force makes the behaviour safe for moved tags.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 14:02:06 -04:00
2 changed files with 9 additions and 4 deletions

View File

@@ -29,8 +29,10 @@ jobs:
docker pull "$IMAGE:$TAG"
docker tag "$IMAGE:$TAG" golfgame-app:latest
# Update code for compose/env changes
git fetch origin
# Update code for compose/env changes. `--tags --force` so a
# moved tag (hotfix on top of existing version) updates locally
# instead of silently checking out the stale cached position.
git fetch origin --tags --force
git checkout "$TAG"
# Restart app

View File

@@ -21,8 +21,11 @@ jobs:
cd /opt/golfgame
# Pull latest code and checkout the release tag
git fetch origin
# Pull latest code and checkout the release tag. `--tags --force`
# so that a tag moved on origin (e.g. hotfix on top of an existing
# version) actually updates locally instead of silently reusing a
# stale cached tag position.
git fetch origin --tags --force
git checkout "$TAG"
# Build the image