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:
@@ -49,6 +49,12 @@ jobs:
|
|||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
outputs:
|
outputs:
|
||||||
digest: ${{ steps.build.outputs.digest }}
|
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:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: docker/setup-buildx-action@v3
|
- uses: docker/setup-buildx-action@v3
|
||||||
|
|||||||
Reference in New Issue
Block a user