Added env: DOCKER_HOST: tcp://docker-host:2375 at the publish job level in .gitea/workflows/build.yaml. Workflow-level env: is guaranteed to land in every step's process — including composite/JS actions like buildx and build-push — regardless of whether the runner's own config-based env injection is working. It reuses the same docker-host alias your runner config already provisions via --add-host=docker-host:host-gateway, so no cluster/runner changes are needed.

This commit is contained in:
dingo
2026-09-06 08:36:35 -04:00
parent ebe73d5bc6
commit 95bec34fee
+6
View File
@@ -49,6 +49,12 @@ jobs:
runs-on: ubuntu-22.04
outputs:
digest: ${{ steps.build.outputs.digest }}
env:
# The runner's job containers get docker-host mapped to the DinD sidecar via
# --add-host=docker-host:host-gateway (see gitea-runner-config), but that alone
# doesn't guarantee every step's own process env has DOCKER_HOST set — declare it
# here so buildx/build-push can always find the daemon.
DOCKER_HOST: tcp://docker-host:2375
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3