Align CI cleanup with instructions
Build and deploy Worker / build (push) Successful in 11m47s

This commit is contained in:
Ruslan Bakiev
2026-06-12 14:13:52 +07:00
parent 07ffd95a02
commit 321eab6d6d
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -27,6 +27,10 @@ jobs:
set -euo pipefail
for attempt in 1 2 3; do
if docker buildx build --push --provenance=false --tag "$IMAGE_SHA" --tag "$IMAGE_LATEST" .; then
published_images="$(docker image ls --format '{{.Repository}}:{{.Tag}}' | awk -v sha="$IMAGE_SHA" -v latest="$IMAGE_LATEST" '$0 == sha || $0 == latest')"
if [ -n "$published_images" ]; then
docker image rm -f $published_images
fi
exit 0
fi
sleep "$((attempt * 10))"