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 <noreply@anthropic.com>
This commit is contained in:
parent
4d3ab2e92f
commit
96fb092f35
1 changed files with 8 additions and 1 deletions
|
|
@ -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'
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue