- Go 96.4%
- Dockerfile 3.6%
|
All checks were successful
build / test (pull_request) Successful in 55s
build / test (push) Successful in 57s
build / build (pull_request) Has been skipped
build / generate-sbom (push) Successful in 1m15s
build / generate-sbom (pull_request) Successful in 1m9s
build / build (push) Successful in 1m14s
|
||
|---|---|---|
| .forgejo/workflows | ||
| helper | ||
| Dockerfile | ||
| Readme.md | ||
| renovate.json | ||
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
- writes the registry login, starts rootless
buildkitd - builds for
linux/amd64,linux/arm64and pushes<image>:<tag>and<image>:<commit sha> - writes
image-hash.txtand the step outputsdigestandimage($GITHUB_OUTPUT) - 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 buildkit runner label (flux repo, services/forgejo-runner) runs this image as non-root with seccomp and
apparmor unconfined, not privileged. Workflows normally use it through infra/ci-snippets.
The image contains node and git so actions/checkout works inside it.
The kaniko bootstrap build in this repository needs no extra privileges.
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.