No description
  • Shell 89.7%
  • Makefile 10.3%
Find a file
Stephen Way e83d37c2d6
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:16:49 -07:00
.forgejo Add Forgejo-compatible docker-build action 2026-05-28 09:41:31 -07:00
.githooks Add Forgejo-compatible docker-build action 2026-05-28 09:41:31 -07:00
examples/workflows Repoint references from rasterstate to fjord org 2026-06-03 16:16:49 -07:00
scripts Add Forgejo-compatible docker-build action 2026-05-28 09:41:31 -07:00
tests Add Forgejo-compatible docker-build action 2026-05-28 09:41:31 -07:00
.editorconfig Add Forgejo-compatible docker-build action 2026-05-28 09:41:31 -07:00
.gitignore Add Forgejo-compatible docker-build action 2026-05-28 09:41:31 -07:00
action.yml Repoint references from rasterstate to fjord org 2026-06-03 16:16:49 -07:00
CHANGELOG.md Add Forgejo-compatible docker-build action 2026-05-28 09:41:31 -07:00
CONTRIBUTING.md Add Forgejo-compatible docker-build action 2026-05-28 09:41:31 -07:00
LICENSE Add Forgejo-compatible docker-build action 2026-05-28 09:41:31 -07:00
Makefile Add Forgejo-compatible docker-build action 2026-05-28 09:41:31 -07:00
MIGRATION.md Repoint references from rasterstate to fjord org 2026-06-03 16:16:49 -07:00
README.md Repoint references from rasterstate to fjord org 2026-06-03 16:16:49 -07:00
SECURITY.md Add Forgejo-compatible docker-build action 2026-05-28 09:41:31 -07:00

docker-build-action

test

Build and push container images with docker buildx on Forgejo Actions runners. A docker/build-push-action-style wrapper that defaults the build context to the checked-out workspace (never https://github.com/<owner>/<repo>.git) and works with any OCI registry. Composite action, pure shell, no build step.

Quick start

jobs:
  image:
    runs-on: [self-hosted, Linux]
    steps:
      - uses: actions/checkout@v6
      - uses: https://rasterhub.com/fjord/docker-build-action@v1
        with:
          tags: rasterhub.com/myorg/app:latest
          push: true
          registry: rasterhub.com
          username: ${{ secrets.FORGEJO_USER }}
          password: ${{ secrets.FORGEJO_TOKEN }}

Inputs

Close to docker/build-push-action.

Input Default Description
context . Build context: a path (workspace), a git URL, or <url>#ref:subdir.
file Dockerfile path.
tags Image tags, one per line.
labels Labels, one per line.
build-args KEY=VALUE, one per line.
secrets / ssh buildx --secret / --ssh specs, one per line.
platforms Comma list, e.g. linux/amd64,linux/arm64.
target Target build stage.
cache-from / cache-to BuildKit cache specs, one per line.
push / load false Push to the registry / load into the local image store.
pull / no-cache false Pull newer bases / disable cache.
provenance / sbom Attestation values passed to buildx.
extra-args Extra buildx args appended verbatim.
registry / username / password Optional docker login before building. Empty registry is Docker Hub.

Outputs

Output Description
imageid The built image id.
digest The image digest (when pushed).
metadata The buildx metadata JSON.

Context: never github.com

docker/build-push-action defaults context to the repository's git context, which on GitHub resolves to a github.com URL. This action defaults to . (the directory you checked out), so it builds your Forgejo-hosted source with no github.com dependency. For an explicit git context, set context to your Forgejo repo URL, optionally with a subdir:

with:
  context: https://rasterhub.com/myorg/app.git#main:services/api

Registries

The login inputs are registry-agnostic:

  • Docker Hub: leave registry empty.
  • GHCR: registry: ghcr.io.
  • Forgejo package registry: registry: <your-forgejo-host> with a token.
  • Any OCI registry: set registry to its host.

Or run a separate login step and omit these inputs.

BuildKit cache

Pass-through to buildx, so any backend works:

with:
  cache-from: type=registry,ref=rasterhub.com/myorg/app:buildcache
  cache-to: type=registry,ref=rasterhub.com/myorg/app:buildcache,mode=max
  • registry cache: shown above; portable across runners.
  • local cache: type=local,src=/mnt/bk-cache / type=local,dest=/mnt/bk-cache,mode=max (good with a shared mount).
  • s3 cache: type=s3,region=...,bucket=... with credentials in the job env, if your BuildKit supports the s3 exporter.

Requirements

  • docker with the buildx plugin on the runner. The action ensures a builder exists.

Examples

See examples/workflows: build-only, build-and-push, registry cache, local cache, and Forgejo-hosted source.

Migrating from docker/build-push-action

See MIGRATION.md.

License

MIT. See LICENSE.