Forgejo drop-in for docker/setup-buildx-action: create and bootstrap a docker buildx (BuildKit) builder, no github.com at runtime.
  • JavaScript 66.7%
  • Shell 27.5%
  • Makefile 5.8%
Find a file
Stephen Way 87ede7d578
Some checks are pending
test / unit (push) Waiting to run
test / e2e (push) Waiting to run
Repoint references from rasterstate to fjord org
Org migration: the action family now lives under fjord/. Repoints internal repo references (uses:, CI badges, docs, migration guides) at fjord/ and sets the action author to fjord. The old rasterstate copies are left in place.
2026-06-03 16:17:06 -07:00
.forgejo/workflows Initial release: setup-buildx-action for Forgejo 2026-05-31 10:04:32 -07:00
examples/workflows Repoint references from rasterstate to fjord org 2026-06-03 16:17:06 -07:00
src Initial release: setup-buildx-action for Forgejo 2026-05-31 10:04:32 -07:00
tests Initial release: setup-buildx-action for Forgejo 2026-05-31 10:04:32 -07:00
.gitignore Initial release: setup-buildx-action for Forgejo 2026-05-31 10:04:32 -07:00
action.yml Repoint references from rasterstate to fjord org 2026-06-03 16:17:06 -07:00
CHANGELOG.md Initial release: setup-buildx-action for Forgejo 2026-05-31 10:04:32 -07:00
LICENSE Initial release: setup-buildx-action for Forgejo 2026-05-31 10:04:32 -07:00
Makefile Initial release: setup-buildx-action for Forgejo 2026-05-31 10:04:32 -07:00
MIGRATION.md Repoint references from rasterstate to fjord org 2026-06-03 16:17:06 -07:00
README.md Repoint references from rasterstate to fjord org 2026-06-03 16:17:06 -07:00

Setup Docker Buildx (Forgejo)

Forgejo's missing docker/setup-buildx-action. Create and bootstrap a docker buildx (BuildKit) builder on a self-hosted Forgejo runner, using the buildx that already ships with the runner's Docker. No buildx binary is downloaded from github.com at runtime.

Part of the Fjord Actions bundle. Pairs with docker-build-action: this action provisions a docker-container builder (the one that supports registry cache export and multi-platform), then the build action uses it.

Why

The default Docker builder (the docker driver) cannot export a BuildKit cache to a registry (--cache-to type=registry) and cannot build multi-platform. For either you need a docker-container builder. docker/setup-buildx-action does that on GitHub but pulls a buildx release from github.com; this action does the same provisioning with the runner's installed buildx, so nothing in the hot path depends on github.com.

Usage

jobs:
  build:
    runs-on: linux-docker        # a runner with real Docker (host mode)
    steps:
      - uses: actions/checkout@v6

      - name: Set up Docker Buildx
        uses: https://rasterhub.com/fjord/setup-buildx-action@v1

      - name: Build and push
        uses: https://rasterhub.com/fjord/docker-build-action@v1
        with:
          context: .
          file: core/Dockerfile
          push: true
          tags: registry.example.com/app:latest
          cache-from: type=registry,ref=registry.example.com/app:buildcache
          cache-to: type=registry,ref=registry.example.com/app:buildcache,mode=max

Zero-config gives you a bootstrapped docker-container builder set as current (--use), torn down in a post step at job end.

Inputs

Input Default Description
driver docker-container Builder driver: docker-container, docker, kubernetes, remote.
driver-opts Driver options key=value, one per line (e.g. image=moby/buildkit:v0.16.0, network=host).
buildkitd-flags Flags for the buildkitd daemon (e.g. --allow-insecure-entitlement network.host).
buildkitd-config Path to a BuildKit daemon TOML config.
buildkitd-config-inline Inline BuildKit TOML; written to a temp file and passed as --config.
endpoint Optional node endpoint for the builder.
platforms Fixed platforms for the node, comma separated.
name auto Builder name. Required when append is true.
append false Append a node to the existing builder named by name.
install false Set buildx as the default docker build (docker buildx install). Reverted on cleanup.
use true Switch the current builder to the one created here.
cleanup true Remove the builder in the post step.
keep-state false Keep the BuildKit state volume on teardown (docker buildx rm --keep-state).
version Informational only; see MIGRATION.md.

Outputs

Output Description
name Name of the builder created or selected.
driver Builder driver.
platforms Comma-separated platforms available on the builder.
endpoint Endpoint of the first node.
status Status of the first node (e.g. running).
nodes JSON array of nodes (name, endpoint, status, platforms).

Requirements

A runner with a real Docker daemon and the buildx plugin (Docker 19.03+). On the Fjord stack that means a host-mode runner (the job runs on the VM and uses its Docker), not a job-container runner that only has the socket mounted.

Pinning BuildKit

The buildx CLI version is whatever the runner's Docker ships. To pin BuildKit (the thing that actually does the build), set the builder image, pulled from your registry or Docker Hub, never GitHub:

      - uses: https://rasterhub.com/fjord/setup-buildx-action@v1
        with:
          driver-opts: image=moby/buildkit:v0.16.0

See MIGRATION.md for the differences from docker/setup-buildx-action.

License

MIT, see LICENSE.