Tycho: job images and reusable actions for the CI of a self-hosted forge
  • Shell 75.9%
  • Dockerfile 24.1%
Find a file
Olivier Lépine 98a7f739d6
All checks were successful
Publish images / Publish ci-base (push) Successful in 18s
CI / Build and test ci-base (push) Successful in 58s
Merge pull request 'refactor: read the image version from a package.json' (#5) from refactor/4-image-version-package-json into develop
Reviewed-on: #5
2026-11-14 12:14:16 +00:00
.forgejo/workflows feat: publish from the fork of a forge 2026-11-14 12:17:49 +01:00
actions/build-image refactor: read the image version from a package.json (#4) 2026-11-14 13:11:08 +01:00
images/ci-base refactor: read the image version from a package.json (#4) 2026-11-14 13:11:08 +01:00
.gitignore feat: add the ci-base job image and the build-image action 2026-11-14 12:14:12 +01:00
AGENTS.md refactor: read the image version from a package.json (#4) 2026-11-14 13:11:08 +01:00
LICENSE Initial commit 2026-11-14 11:11:18 +00:00
README.fr.md feat: publish from the fork of a forge 2026-11-14 12:17:49 +01:00
README.md feat: publish from the fork of a forge 2026-11-14 12:17:49 +01:00

🇫🇷 Version française

Tycho forge-ci

Job images and reusable actions for the CI of a self-hosted forge (Forgejo Actions).

This repository holds recipes and the action that builds them. Upstream, it publishes nothing: each forge forks it, and the fork builds the images and pushes them to the registry of that forge. A forge therefore depends on no image hosted elsewhere, and decides when it moves to a newer version.

Path Content
images/ci-base Job image with the usual CI tools already installed (Node.js, Bun, Git LFS, build toolchain, Docker CLI)
actions/build-image Action that builds a recipe, runs its smoke test and publishes it for amd64 and arm64
.forgejo/workflows/publish.yml Publication workflow, idle until a fork is configured

Publishing on a forge

  1. Fork this repository into an organisation of your forge (or mirror it there when the forge has no access to the upstream one).

  2. Set the publication settings of the fork or of its organisation (Settings > Actions):

    Kind Name Value
    Variable IMAGE_REGISTRY Registry host
    Secrets REGISTRY_USER, REGISTRY_TOKEN Account allowed to push packages
  3. Synchronise the fork with upstream. Each push runs the publication workflow:

    Branch of the fork Tags published
    main X.Y.Z, X.Y, X
    develop X.Y.Z-dev.<short revision>, develop

The image is published as <IMAGE_REGISTRY>/<owner of the fork>/ci-base. A released X.Y.Z is never overwritten: the run ends without publishing when the registry already holds it.

The first run uses the default job image of the runner: the action installs the Docker client it lacks.

The fork carries no change of its own. To move to a newer image, synchronise it with upstream; to stay on a version, do not.

The build-image action

- uses: ./actions/build-image
  with:
    registry: ${{ vars.IMAGE_REGISTRY }}
    username: ${{ secrets.REGISTRY_USER }}
    password: ${{ secrets.REGISTRY_TOKEN }}
Input Default Purpose
image ci-base Recipe directory under images/
registry Registry host. Required to publish
namespace owner of the calling repository Path under the registry
username, password Account allowed to push. Required to publish
push true false stops after the build and the smoke test
channel release release publishes X.Y.Z, X.Y, X and refuses to overwrite X.Y.Z; develop publishes X.Y.Z-dev.<revision> and develop
if-exists fail Release channel, version already published: fail, or skip to end without publishing
platforms linux/amd64,linux/arm64 Platforms to publish
source-url Value of the org.opencontainers.image.source label
docker-host tcp://127.0.0.1:2375 Docker endpoint used when DOCKER_HOST is not set

Outputs: version (read from the recipe) and image (full reference of the published image).

The job needs a Docker daemon it can reach (the DinD sidecar of the runner) that accepts privileged containers, for the emulation of the second architecture.

Development

INPUT_PUSH=false actions/build-image/build-image.sh

builds ci-base for the local architecture and runs its smoke test. The CI of this repository does the same on every pull request.

Licence

AGPL-3.0-only, © Quatrain Technologies.