docker/setup-buildx-action@v4
Set up Docker Buildx
At a glance
- Latest major
v4- Repository
- docker/setup-buildx-action
- Inputs
- 14 (0 required)
- Outputs
- 7
- Runs using
node24- License
- Apache-2.0
- Last checked
Inputs and outputs come straight from the action's official action.yml. See our editorial standards.
Usage
- uses: docker/setup-buildx-action@v4Inputs
| Name | Required | Default | Description |
|---|---|---|---|
version | No | none | Buildx version. (eg. v0.3.0) |
driver | No | docker-container | Sets the builder driver to be used |
driver-opts | No | none | List of additional driver-specific options. (eg. image=moby/buildkit:master) |
buildkitd-flags | No | none | BuildKit daemon flags |
buildkitd-config | No | none | BuildKit daemon config file |
buildkitd-config-inline | No | none | Inline BuildKit daemon config |
use | No | true | Switch to this builder instance |
name | No | none | Name of the builder. If not specified, one will be generated or if it already exists, it will be used instead of creating a new one. |
endpoint | No | none | Optional address for docker socket or context from `docker context ls` |
platforms | No | none | Fixed platforms for current node. If not empty, values take priority over the detected ones |
append | No | none | Append additional nodes to the builder |
keep-state | No | false | Keep BuildKit state on cleanup. This is only useful on persistent self-hosted runners. |
cache-binary | No | true | Cache buildx binary to GitHub Actions cache backend |
cleanup | No | true | Cleanup temp files and remove builder at the end of a job |
Outputs
| Name | Description |
|---|---|
name | Builder name |
driver | Builder driver |
platforms | Builder node platforms (preferred or available) |
nodes | Builder nodes metadata |
endpoint | Builder node endpoint (deprecated, use nodes output instead) |
status | Builder node status (deprecated, use nodes output instead) |
flags | Builder node flags (deprecated, use nodes output instead) |
Read an output with ${{ steps.<step-id>.outputs.<name> }}; the step needs an id.
Examples
Enable Buildx
Required for cache backends, multi-platform builds and provenance.
name: Example
on:
push:
branches: [main]
permissions:
contents: read
jobs:
example:
runs-on: ubuntu-latest
steps:
- name: Docker Setup Buildx
uses: docker/setup-buildx-action@v4Each example passed actionlint (syntax, expressions and the inputs it knows for this action). They were not run in a live repository, so replace placeholder values such as names, ARNs and paths with your own.
Something out of date or wrong? Report it on our Contact page. This page is rebuilt from the action's repository roughly once a week.