mirror of
https://github.com/NVIDIA/OpenShell.git
synced 2026-10-19 05:50:41 +08:00
#966 hard-coded `buildkitd-config: /etc/buildkit/buildkitd.toml` inside the `driver: local` branch of the setup-buildx composite action. The only caller using that driver is shadow-docker-build.yml, which runs inside the ghcr.io/nvidia/openshell/ci:latest container — so the host-side buildkitd.toml was invisible to docker/setup-buildx-action and every matrix job failed at "Set up buildx". Revert the hard-coded path and expose it as an opt-in input on the action (empty default, passed through to both the remote and local branches). Wire shadow-docker-build.yml to bind-mount /etc/buildkit into the ci container and pass the path explicitly, so the action can read the file from inside the container. Remote-driver callers are unaffected (empty input is a no-op). Signed-off-by: Jonas Toelke <jtoelke@nvidia.com>
58 lines
2.1 KiB
YAML
58 lines
2.1 KiB
YAML
name: Setup Docker Buildx
|
|
description: >
|
|
Create a Docker Buildx builder. Two modes:
|
|
* driver=remote (default) — multi-arch builder against in-cluster BuildKit
|
|
pods. Requires EKS connectivity. Behaviour unchanged from prior versions.
|
|
* driver=local — single-node buildx on the local docker-container driver.
|
|
Pair with cache-to/cache-from=type=gha on build steps for persistence.
|
|
Works on nv-gha-runners; no EKS needed.
|
|
Cleanup is automatic when the job finishes (docker/setup-buildx-action default).
|
|
|
|
inputs:
|
|
driver:
|
|
description: "buildx driver: 'remote' or 'local'"
|
|
default: remote
|
|
amd64-endpoint:
|
|
description: BuildKit endpoint for linux/amd64 (remote driver only)
|
|
default: tcp://buildkit-amd64.buildkit:1234
|
|
arm64-endpoint:
|
|
description: BuildKit endpoint for linux/arm64 (remote driver only)
|
|
default: tcp://buildkit-arm64.buildkit:1234
|
|
name:
|
|
description: Builder instance name
|
|
default: openshell
|
|
buildkitd-config:
|
|
description: >
|
|
Path to a buildkitd.toml to configure the builder with (e.g. the
|
|
nv-gha-runners Docker Hub mirror at /etc/buildkit/buildkitd.toml).
|
|
Must be readable *from where this action runs* — in a containerized
|
|
job that means the caller must bind-mount the host path into the job
|
|
container (e.g. `volumes: [/etc/buildkit:/etc/buildkit:ro]`). Empty
|
|
disables the config (default).
|
|
default: ""
|
|
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Set up Docker Buildx (remote)
|
|
if: inputs.driver == 'remote'
|
|
uses: docker/setup-buildx-action@v3
|
|
with:
|
|
name: ${{ inputs.name }}
|
|
driver: remote
|
|
endpoint: ${{ inputs.amd64-endpoint }}
|
|
platforms: linux/amd64
|
|
append: |
|
|
- endpoint: ${{ inputs.arm64-endpoint }}
|
|
platforms: linux/arm64
|
|
buildkitd-config: ${{ inputs.buildkitd-config }}
|
|
|
|
- name: Set up Docker Buildx (local)
|
|
if: inputs.driver == 'local'
|
|
uses: docker/setup-buildx-action@v3
|
|
with:
|
|
name: ${{ inputs.name }}
|
|
driver: docker-container
|
|
platforms: linux/amd64,linux/arm64
|
|
buildkitd-config: ${{ inputs.buildkitd-config }}
|