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.
Summary
useblacksmith/setup-docker-buildercreates 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-actionharder for workflows that passsteps.<id>.outputs.nameto scripts or explicit--builderflags.Motivation
docker/setup-buildx-actionexposes anameoutput:and sets it in the action implementation. Existing workflows may rely on it:
When replacing
docker/setup-buildx-actionwithuseblacksmith/setup-docker-builder,steps.buildx.outputs.nameis 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
nameoutput, compatible withdocker/setup-buildx-actionmigration patterns.Example:
Proposed implementation
When a Blacksmith builder is created, call:
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_BUILDERfor subsequent steps, especially for plaindocker build. This issue is specifically about exposing the builder name as an action output for compatibility withdocker/setup-buildx-actionmigration patterns.