diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index f69cb99..3c3d8dc 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -28,6 +28,27 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + with: + # Put BuildKit in the host's network namespace so it can reach + # act_runner's cache service. + # + # The `docker-container` driver — which the multi-arch build below + # requires, since the plain `docker` driver cannot do + # linux/amd64+linux/arm64 — runs BuildKit in its *own* container on + # Docker's default bridge. act_runner advertises ACTIONS_CACHE_URL as + # an address the *job* container can reach, and nothing teaches the + # BuildKit container about it: the job could reach + # 192.168.1.126:40649 while the container actually making the request + # could not, and the build died with `no route to host`. + # + # `no route to host` is EHOSTUNREACH — a firewall rejecting, not a + # missing route (a wrong address times out instead) — which is what a + # default firewalld zone does to traffic arriving from the docker + # bridge. Sharing the host's namespace sidesteps the question + # entirely: the cache address becomes local to BuildKit. + # + # No effect on runners where this already worked. + driver-opts: network=host - name: Login to Gitea Container Registry uses: docker/login-action@v3