From 5ef5fce4a42c73b0a2bf3114d523777582f04668 Mon Sep 17 00:00:00 2001 From: ArthurErlich Date: Thu, 6 Aug 2026 22:03:06 +0200 Subject: [PATCH] fix(publish): free runner disk before build and retry docker push MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Auto-tracking the newest Godot/Blender means most nightly runs now build genuinely new multi-GB layers instead of hitting cache, and nothing ever pruned old ones — the runner's disk fills up over successive runs until a push fails. Prune before building, and retry docker push a few times to ride out transient registry 500s. Co-Authored-By: Claude Sonnet 5 --- .gitea/workflows/publish.yml | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml index 3cd26fd..43c4624 100644 --- a/.gitea/workflows/publish.yml +++ b/.gitea/workflows/publish.yml @@ -65,6 +65,15 @@ jobs: id: blender run: echo "url=$(./scripts/resolve-blender-url.sh)" >> "$GITHUB_OUTPUT" + # Now that this workflow tracks the newest Godot/Blender instead of one + # pinned version, most nightly runs build genuinely new multi-GB layers + # instead of hitting cache — nothing here ever pruned old ones, so the + # runner's disk fills up over successive runs until a push (a blob + # write) is what finally fails. Clear stale images/build cache first. + - name: Free up runner disk + if: steps.resolve.outputs.skip != 'true' + run: docker system prune -af --volumes + - name: Build and push if: steps.resolve.outputs.skip != 'true' run: | @@ -74,11 +83,26 @@ jobs: --build-arg GODOT_VERSION="$VERSION" \ --build-arg BLENDER_URL="${{ steps.blender.outputs.url }}" \ -t "${IMAGE}:${VERSION}" . - docker push "${IMAGE}:${VERSION}" + + # Registry blob PUTs have been failing with transient 500s + # (unrelated to build correctness) — retry a few times before + # giving up. + push_with_retry() { + for attempt in 1 2 3; do + if docker push "$1"; then + return 0 + fi + echo "::warning::docker push $1 failed (attempt $attempt/3), retrying..." + sleep $((attempt * 10)) + done + return 1 + } + + push_with_retry "${IMAGE}:${VERSION}" if [ "${{ steps.resolve.outputs.update_latest }}" = "true" ]; then docker tag "${IMAGE}:${VERSION}" "${IMAGE}:latest" - docker push "${IMAGE}:latest" + push_with_retry "${IMAGE}:latest" fi # Gitea packages belong to the owner, not a repo, by default — pushing