Description
Summary
useblacksmith/setup-docker-builder creates and selects a Buildx builder, but it does not expose the selected builder name as an action output.
This makes migration from docker/setup-buildx-action harder for workflows that pass steps.<id>.outputs.name to scripts or explicit --builder flags.
Motivation
docker/setup-buildx-action exposes a name output:
outputs:
name:
description: "Builder name"and sets it in the action implementation. Existing workflows may rely on it:
- id: buildx
uses: docker/setup-buildx-action@v4
- run: make docker.push
env:
DOCKER_BUILDX_INSTANCE: ${{ steps.buildx.outputs.name }}When replacing docker/setup-buildx-action with useblacksmith/setup-docker-builder, steps.buildx.outputs.name is empty.
Current behavior
The action generates a builder name internally, creates a remote builder, and runs docker buildx use <name>, but later workflow steps cannot read the selected builder name.
Expected behavior
Expose the selected builder name as a name output, compatible with docker/setup-buildx-action migration patterns.
Example:
- id: buildx
uses: useblacksmith/setup-docker-builder@v1
- run: docker buildx bake --builder "${BUILDX_NAME}"
env:
BUILDX_NAME: ${{ steps.buildx.outputs.name }}Proposed implementation
When a Blacksmith builder is created, call:
core.setOutput("name", name);For fallback or reused-builder paths, it would also be useful to expose the actual selected builder name if it can be determined from toolkit.builder.inspect().
Related
This is related to, but distinct from, #70.
#70 asks for setting BUILDX_BUILDER for subsequent steps, especially for plain docker build. This issue is specifically about exposing the builder name as an action output for compatibility with docker/setup-buildx-action migration patterns.
Activity