Rename repo/image path to stan/website; retag legacy images on rollback
All checks were successful
Deploy production / deploy (push) Successful in 2m23s
All checks were successful
Deploy production / deploy (push) Successful in 2m23s
This commit is contained in:
@@ -16,8 +16,15 @@ origin=https://stanrunge.dev
|
||||
environment=/etc/personal-website/prod.env
|
||||
environment_name=production
|
||||
|
||||
image="git.stanrunge.dev/stan/personal-website:$sha"
|
||||
image="git.stanrunge.dev/stan/website:$sha"
|
||||
compose="$directory/compose.prod.yml"
|
||||
# Images built before the repo rename (stan/personal-website -> stan/website) keep
|
||||
# their old local name; retag so rollbacks to those SHAs still work.
|
||||
legacy_image="git.stanrunge.dev/stan/personal-website:$sha"
|
||||
if ! sudo docker image inspect "$image" >/dev/null 2>&1 &&
|
||||
sudo docker image inspect "$legacy_image" >/dev/null 2>&1; then
|
||||
sudo docker tag "$legacy_image" "$image"
|
||||
fi
|
||||
if ! sudo docker image inspect "$image" >/dev/null 2>&1; then
|
||||
echo "Image $image is not on this host" >&2; exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user