fix(ci): force-update tags on deploy fetch
All checks were successful
Build & Deploy Staging / build-and-deploy (release) Successful in 28s
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>
This commit is contained in:
@@ -29,8 +29,10 @@ jobs:
|
|||||||
docker pull "$IMAGE:$TAG"
|
docker pull "$IMAGE:$TAG"
|
||||||
docker tag "$IMAGE:$TAG" golfgame-app:latest
|
docker tag "$IMAGE:$TAG" golfgame-app:latest
|
||||||
|
|
||||||
# Update code for compose/env changes
|
# Update code for compose/env changes. `--tags --force` so a
|
||||||
git fetch origin
|
# 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"
|
git checkout "$TAG"
|
||||||
|
|
||||||
# Restart app
|
# Restart app
|
||||||
|
|||||||
@@ -21,8 +21,11 @@ jobs:
|
|||||||
|
|
||||||
cd /opt/golfgame
|
cd /opt/golfgame
|
||||||
|
|
||||||
# Pull latest code and checkout the release tag
|
# Pull latest code and checkout the release tag. `--tags --force`
|
||||||
git fetch origin
|
# 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"
|
git checkout "$TAG"
|
||||||
|
|
||||||
# Build the image
|
# Build the image
|
||||||
|
|||||||
Reference in New Issue
Block a user