diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index bf5f4f3..f69cb99 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -55,5 +55,21 @@ jobs: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ gitea.sha }} ghcr.io/shadowdao/triple-c-sandbox:latest ghcr.io/shadowdao/triple-c-sandbox:${{ gitea.sha }} + # `ignore-error` is what stops a cache failure failing a build that + # already succeeded. act_runner emulates the GitHub Actions cache + # service on the runner host's LAN address, and the `docker-container` + # builder `setup-buildx-action` creates could not route to it — + # every layer of both arches built, then the job died on + # `GetCacheEntryDownloadURL: no route to host` while exporting. + # + # On a pull_request `push:` above is false, so this job pushes + # nothing and the cache is its only output: failing it discarded a + # complete, successful validation of the Dockerfile for both + # architectures. A cache is an optimisation and must degrade to + # "slow", never to "red". + # + # The import is already non-fatal — the build ran all 37 layers after + # warning that it could not read the cache — so only the exporter + # needs the flag. cache-from: type=gha - cache-to: type=gha,mode=max + cache-to: type=gha,mode=max,ignore-error=true