No description
  • Go 96.4%
  • Dockerfile 3.6%
Find a file
Jonas Leder 2ecb8ddb2b
Some checks failed
build / test (push) Has been cancelled
build / build (push) Has been cancelled
build / generate-sbom (push) Has been cancelled
Port builder to Forgejo Actions
- helper reads Forgejo (GITHUB_*) variables, CI_* stay as fallback
- sequential tag pushes and one retry for Forgejo registry upload races
- trivy: native JSON reports and HIGH/CRITICAL table instead of GitLab code quality
- step outputs digest and image via GITHUB_OUTPUT
- image gets node, git and bash so actions/checkout runs inside it
- .forgejo/workflows/build.yml replaces .gitlab-ci.yml

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-18 00:07:56 +01:00
.forgejo/workflows Port builder to Forgejo Actions 2026-11-18 00:07:56 +01:00
helper Port builder to Forgejo Actions 2026-11-18 00:07:56 +01:00
Dockerfile Port builder to Forgejo Actions 2026-11-18 00:07:56 +01:00
Readme.md Port builder to Forgejo Actions 2026-11-18 00:07:56 +01:00
renovate.json Migrate config renovate.json 2026-03-23 09:08:17 +01:00

Docker Build Container using buildkit

Rootless buildkit plus the build-image helper and trivy. It is the builder image behind the reusable workflows in infra/ci-snippets, which is the normal way to use it.

Image: <forgejo host>/infra/docker-build:master

What build-image does

  1. writes the registry login, starts rootless buildkitd
  2. builds for linux/amd64,linux/arm64 and pushes <image>:<tag> and <image>:<commit sha>
  3. writes image-hash.txt and the step outputs digest and image ($GITHUB_OUTPUT)
  4. scans image and repo with trivy: native JSON reports plus a table of HIGH/CRITICAL findings in the log

Environment

Forgejo Actions values are used when no override is set. GitLab CI CI_* variables still work as fallback.

Variable Default (Forgejo) Meaning
REGISTRY host of GITHUB_SERVER_URL registry host
REGISTRY_USER / REGISTRY_PASSWORD GITHUB_ACTOR / GITHUB_TOKEN registry login
IMAGE_NAME <registry>/<lowercase GITHUB_REPOSITORY> image without tag
IMAGE_TAG slug of the branch or tag, latest on the default branch tag
DEFAULT_BRANCH none branch that gets latest
DOCKERFILE_PATH Dockerfile path relative to the checkout
ARCHITECTURES amd64,arm64 comma separated
IMAGE_PUSH true false builds without push
BUILDKIT_ADDITIONAL_ARGS extra buildctl build arguments
REGISTRY_MIRROR docker.io mirror for buildkit
GOPROXY / GOPROXY_DISABLE https://goproxy.jonasled.dev,direct passed as build arg
TRIVY_SKIP / TRIVY_TIMEOUT false / 5m scan control
BUILDCTL_TTY false colored progress

Runner requirements

The job container needs a runner that allows privileged job containers (rootless buildkit needs user namespaces). The image contains node and git so actions/checkout works inside it.

This repository

.forgejo/workflows/build.yml runs the helper tests, builds this image with kaniko (the image cannot build itself on the first run) and creates the helper SBOM.