fix(ci): retry frontend buildx build on EOF failures

This commit is contained in:
Tracewebstudio Dev 2026-05-01 00:22:55 +02:00
parent 6a5cd11b2f
commit 9a21b7859f

View file

@ -39,8 +39,26 @@ jobs:
run: |
set -euo pipefail
export DOCKER_HOST=unix:///var/run/docker.sock
docker buildx build --push \
-f Dockerfile \
-t "$REGISTRY_HOSTPORT/nxtgauge-frontend-solid:${{ gitea.sha }}" \
-t "$REGISTRY_HOSTPORT/nxtgauge-frontend-solid:high-performance-latest" \
.
build_and_push() {
docker buildx build --push \
-f Dockerfile \
-t "$REGISTRY_HOSTPORT/nxtgauge-frontend-solid:${{ gitea.sha }}" \
-t "$REGISTRY_HOSTPORT/nxtgauge-frontend-solid:high-performance-latest" \
.
}
for attempt in 1 2 3; do
echo "Build attempt $attempt"
if build_and_push; then
exit 0
fi
echo "Build attempt $attempt failed; recreating builder and retrying"
docker buildx rm --all-inactive --force || true
docker buildx create --use || true
docker buildx inspect --bootstrap
sleep $((attempt * 10))
done
echo "Build failed after retries"
exit 1