From f4e11da1a6dfce34eff26e2e9f5e3e3f469e676e Mon Sep 17 00:00:00 2001 From: Robert Resch Date: Wed, 3 Dec 2025 16:53:45 +0100 Subject: [PATCH] Add retry logic to docker.io image push step (#157859) --- .github/workflows/builder.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/builder.yml b/.github/workflows/builder.yml index db651852c7e..3b52f22f9eb 100644 --- a/.github/workflows/builder.yml +++ b/.github/workflows/builder.yml @@ -416,9 +416,19 @@ jobs: ARCHS=$(echo '${{ needs.init.outputs.architectures }}' | jq -r '.[]') for arch in $ARCHS; do echo "Copying ${arch} image to DockerHub..." - docker buildx imagetools create \ - --tag "docker.io/homeassistant/${arch}-homeassistant:${{ needs.init.outputs.version }}" \ - "ghcr.io/home-assistant/${arch}-homeassistant:${{ needs.init.outputs.version }}" + for attempt in 1 2 3; do + if docker buildx imagetools create \ + --tag "docker.io/homeassistant/${arch}-homeassistant:${{ needs.init.outputs.version }}" \ + "ghcr.io/home-assistant/${arch}-homeassistant:${{ needs.init.outputs.version }}"; then + break + fi + echo "Attempt ${attempt} failed, retrying in 10 seconds..." + sleep 10 + if [ "${attempt}" -eq 3 ]; then + echo "Failed after 3 attempts" + exit 1 + fi + done cosign sign --yes "docker.io/homeassistant/${arch}-homeassistant:${{ needs.init.outputs.version }}" done