Shared CI workflows and pre-commit config (source: lab/homelab ci/templates)
Find a file
2026-11-23 20:25:58 -05:00
.forgejo/workflows ci-templates: sync from lab/homelab 8cea7d1 2026-11-23 20:25:58 -05:00
examples ci-templates: sync from lab/homelab 8cea7d1 2026-11-23 20:25:58 -05:00
pre-commit ci-templates: sync from lab/homelab 8cea7d1 2026-11-23 20:02:38 -05:00
README.md ci-templates: sync from lab/homelab 8cea7d1 2026-11-23 20:25:58 -05:00

ci-templates

Shared CI for every homelab repo. A repo adds one small .forgejo/workflows/ci.yml that calls these workflows, so a fix here reaches every repo at once.

Source of truth: ci/templates/ in lab/homelab, published here by scripts/28-dev-tooling.sh. This repo is public because the Actions runner can only fetch reusable workflows from public repos. It contains no secrets and no hostnames; those come from each org's Actions secrets and variables.

Workflow What it does
lint.yml pre-commit on the whole repo (the repo's own config, else pre-commit/.pre-commit-config.yaml)
container.yml gitleaks, semgrep, checkov, build, Trivy, SBOM, Dependency-Track, DefectDojo, gate, cosign sign. Pull requests get :pr-N and :<head sha> images for preview environments
python.yml ruff, pytest, pip-audit; on a v* tag builds and publishes to the owner's Forgejo PyPI
ansible.yml yamllint + ansible-lint

Copy a caller from examples/ into your repo as .forgejo/workflows/ci.yml.

Shared pre-commit config on your machine

curl -fsSLo .pre-commit-config.yaml https://git.svc.brianhenson.tech/ci/ci-templates/raw/branch/main/pre-commit/.pre-commit-config.yaml
pip install pre-commit && pre-commit install   # checks every commit from now on
pre-commit run --all-files                      # check the whole repo once

Packages

pip install --index-url https://git.svc.brianhenson.tech/api/packages/<owner>/pypi/simple/ <package>

Tag a Python repo v1.2.3 and python.yml publishes it there.