BuilderHub actions and reusable workflows.
Reusable workflows for building and pushing container images. Call them from your repo with workflow_call; pass inputs and secrets as shown below.
Native multi-arch: runs on ubuntu-latest (amd64) and ubuntu-22.04-arm (arm64), then creates a multi-arch manifest. No emulation—each image is built on the target architecture.
jobs:
build:
uses: builderhub/actions/.github/workflows/buildah-build-push-workflow.yaml@v0.1.0-beta.2
with:
image: myorg/myapp
tags: latest ${{ github.sha }}
containerfiles: ./Containerfile
context: .
registry: ghcr.io
push: true # set false to build only
secrets:
REGISTRY_USERNAME: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}Multi-arch via emulation: single job on ubuntu-latest using QEMU and Docker Buildx. arm64 (and other platforms) are emulated, so builds are slower than native but no ARM runner is required.
jobs:
build:
uses: builderhub/actions/.github/workflows/docker-build-push-workflow.yaml@v0.1.0-beta.2
with:
image: myorg/myapp
tags: latest ${{ github.sha }}
containerfiles: ./Dockerfile
context: .
registry: ghcr.io
platforms: linux/amd64,linux/arm64
push: true # set false to build only
secrets:
REGISTRY_USERNAME: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}| Input | Required | Default | Description |
|---|---|---|---|
image |
yes | — | Image name (e.g. owner/repo) |
tags |
no | latest |
Space-separated tags |
containerfiles |
no | ./Containerfile |
Path(s) to Containerfile/Dockerfile |
context |
no | . |
Build context path |
labels |
no | "" |
Image labels (newline-separated key=value) |
annotations |
no | "" |
OCI image annotations (newline-separated key=value) |
registry |
yes | — | Registry host (e.g. ghcr.io) |
push |
no | true |
Push to registry; false = build only |
Docker workflow also has platforms (default linux/amd64,linux/arm64).
Pass via secrets: when calling the workflow:
REGISTRY_USERNAME— registry login usernameREGISTRY_PASSWORD— registry token or password