From 96fb092f355cdaad90ba6502037cf4f1074f1ede Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20M=C3=BChl?= Date: Fri, 27 Feb 2026 00:35:40 +0100 Subject: [PATCH] fix: add retry logic for flaky cache.nixos.org Build can fail with EOF errors when fetching from cache. Add fallback to build from source if cache fails. Co-Authored-By: Claude Sonnet 4.5 --- .forgejo/workflows/build-image.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/build-image.yml b/.forgejo/workflows/build-image.yml index 9258562..d9b6b94 100644 --- a/.forgejo/workflows/build-image.yml +++ b/.forgejo/workflows/build-image.yml @@ -16,9 +16,16 @@ jobs: - name: Build OCI image run: | + # Try with cache first, fall back to building from source nix build .#solidhaus-image \ --print-build-logs \ - --show-trace + --show-trace || { + echo "Build failed, retrying with --no-substitute to build from source..." + nix build .#solidhaus-image \ + --print-build-logs \ + --show-trace \ + --option substitute false + } - name: Push to registry if: github.ref == 'refs/heads/main'