- Shell 98%
- JavaScript 1.6%
- Just 0.3%
- Awk 0.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
ci: reusable-pipeline / CI Pipeline (push) Successful in 1m8s
|
||
| .github | ||
| docs | ||
| references | ||
| scripts | ||
| tests | ||
| .editorconfig | ||
| .gitignore | ||
| AGENT.md | ||
| CHANGELOG.md | ||
| cliff.toml | ||
| justfile | ||
| LICENSE | ||
| mise.toml | ||
| README.md | ||
| renovate.json | ||
| repo-toolkit.json | ||
cjournois/reusable-pipeline
Proprietary — Copyright (c) 2026 cjournois. All rights reserved. SPDX: UNLICENSED. See LICENSE for terms.
Reusable Forgejo Actions workflows shared across cjournois repos. Caller repos copy a small trigger file per unit and get the lint → test → build → publish → release flow. The publish target is derived from the unit's own files (unit facts):
| Profile | The unit has | Publish |
|---|---|---|
| Package | a package.json without "private": true, or a .NET project |
npm on tag (dotnet: release zip) |
| Service | a Containerfile |
docker image on tag / [publish] |
| Base image | a Containerfile and the caller input base_image: true |
docker image every push/schedule; built, not pushed, on a PR |
| Helm | a Chart.yaml (at the root or one level down) |
helm chart on tag / [publish] |
| Check | none of the above | nothing — lint + test |
Quick start (a service unit)
Each caller declares its toolchain in mise.toml in working_directory or a parent. The pipeline runs mise install early; tools land on PATH via shims.
jobs:
pipeline:
uses: cjournois/reusable-pipeline/.github/workflows/unit.yml@main
with:
working_directory: services/my-service # has a Containerfile, so it is a service
secrets: inherit
Required mise.toml:
[tools]
bun = "1.4.4"
Full input and secret tables live in docs/components/unit.md.
Migrating to v7
- Per-unit settings move from the per-unit config file to the caller's
with:(language,tag_prefix,image_name,build_context,min_coverage,skip_test, ...). - A base image sets
base_image: true. language: nodeis gone: Bun is the only JS runtime, usebun.- Secrets come only from
secrets: inheritasBOT_REGISTRY_TOKEN/BOT_RELEASE_TOKEN; the registry and users fromvars.REGISTRY,vars.BOT_REGISTRY_USERNAME,vars.BOT_RELEASE_USERNAME. Callers dropPERSONAL_FORGEJO_TOKENand personalregistry_username/release_usernameinputs, so automation runs as the bot accounts inherited from the owner. quality.ymlchecks one unit per call: one caller job per unit, as in references/quality.yml.
Why no packages/ or services/ directory
This repo is a Forgejo Actions repo — its structure is dictated by the .github/ convention (workflows/ for reusable workflows, actions/ for the setup composite action). It produces neither packages nor deployable services.
Developer: Getting Started
Requirements
- Forgejo Actions (or compatible reusable workflow host)
- Org secrets
BOT_REGISTRY_TOKEN,BOT_RELEASE_TOKENand varsREGISTRY,BOT_REGISTRY_USERNAME,BOT_RELEASE_USERNAME just— command runnermise— toolchain manager (pins shellcheck, actionlint, bats)
Commands
| Command | Purpose |
|---|---|
just lint |
shellcheck (scripts) + the test hygiene CI runs (hygiene.sh tests) + actionlint (workflows) |
just test |
bats test suite |
just bump <version> |
Pin self-refs @main → @<version> (run by the release workflow) |
just post-release <version> |
Put self-refs back on @main (run by the release workflow) |
Maintainer: Troubleshooting
- Secrets missing. Callers pass
secrets: inherit;BOT_REGISTRY_TOKENandBOT_RELEASE_TOKENare both required on the publish path (check units need neither). - Wrong artifact path. Override
build_artifact_pathwhen the build emits something other thandist/. - Private registry 401. Set
private_scopesand ensure the token hasread:package. For k8s runners with internal URLs, the pipeline writes auth for both internal and external hosts automatically. - Containerfile needs sibling packages. Set
build_context: .so BuildKit can see files outsideworking_directory. - Tag not triggering publish. Confirm the tag matches
<tag prefix>-<semver>(the prefix is the directory name unlesstag_prefixoverrides it); runs with mismatched prefixes skip on purpose.