Shared composite actions and workflow starters for my Forgejo repositories (Python test/lint, Docker publish, auto-tag, security scans)
  • Python 74.4%
  • Dockerfile 21.7%
  • JavaScript 3.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
tim 90ef24abd9
All checks were successful
test auto-tag / test (push) Successful in 3s
test docker-publish / test (push) Successful in 8s
test forgejo-release / test (push) Successful in 2s
test hassfest / test (push) Successful in 15s
test node-test / test (push) Successful in 6s
test python-test / test (push) Successful in 15s
test security-scan / test (push) Successful in 28s
Merge pull request 'Promote develop: python-test ruff 0.17.5' (#18) from develop into main
2026-11-20 11:38:23 +00:00
.forgejo/workflows fix: remove the buildx builder container when the build step ends 2026-10-30 09:58:10 +01:00
auto-tag auto-tag: read the version from package.json 2026-10-25 18:00:34 +01:00
docker-publish fix: remove the buildx builder container when the build step ends 2026-10-30 09:58:10 +01:00
fixtures auto-tag: read the version from package.json 2026-10-25 18:00:34 +01:00
forgejo-release Add forgejo-release action 2026-10-14 13:25:08 +02:00
hassfest feat(hassfest): build the image natively for arm64 and prefer it 2026-10-12 14:22:08 +02:00
node-test Add node-test action: Node project checks inside Docker 2026-10-12 17:40:31 +02:00
python-test python-test: ruff 0.17.5, format the PATTERNS.md example 2026-11-20 12:21:12 +01:00
security-scan fix(security-scan): audit the installed environment, not pyproject.toml 2026-10-12 11:16:27 +02:00
templates auto-tag: read the version from package.json 2026-10-25 18:00:34 +01:00
PATTERNS.md python-test: ruff 0.17.5, format the PATTERNS.md example 2026-11-20 12:21:12 +01:00
README.md Add forgejo-release action 2026-10-14 13:25:08 +02:00

workflow-basics

Shared composite actions for my Forgejo repositories, so every project does tests, security scans, image builds and tagging the same way.

Using an action

Always use the full URL form and follow main:

- uses: https://git.timstoop.nl/tim/workflow-basics/python-test@main

The short form tim/workflow-basics/python-test@main does not work: it resolves against the instance's default action source, not this Forgejo.

Copy a starter from templates/ rather than writing a workflow from scratch.

Patterns

PATTERNS.md collects the rules that came out of real problems (no scanner suppressions, validated query fragments, one Python version, release flow, how to read CI results). Point people and LLMs at it before they change code, CI or releases in any repository.

Actions

Action Does Runner
python-test venv, install project, ruff check, ruff format --check, pytest python-3.14
security-scan bandit, pip-audit, gitleaks (checksum verified) python-3.14
node-test npm ci, npm audit, then the project's npm scripts, all inside a Docker build cross-compile
docker-publish multi-arch buildx build and push to this Forgejo's registry cross-compile
forgejo-release create the Forgejo release for a tag: CHANGELOG section as notes, image pull commands, idempotent debian-latest
auto-tag create vX.Y.Z from pyproject.toml when it has a CHANGELOG entry python-3.14
hassfest Home Assistant's own validator for custom integrations (manifest, requirements, config flow, ...) cross-compile

All inputs have defaults and are documented in each action.yml.

Conventions

  • Secret: the global REPO_WRITER_PAT. It is passed in explicitly (registry-token:, or token: on actions/checkout for auto-tag), never read by an action itself. No other token names.
  • No hardcoded hostnames: the registry is derived from github.server_url.
  • Tags drive releases: images are published on vX.Y.Z tags. Branch and PR runs build and test only.
  • Python: runs on the python-3.14 runner label, in a venv.
  • Node: only ever runs in Docker (node-test on the cross-compile label), never on a runner or host.
  • ruff version: the ruff-version input is pinned. Keep it in sync with the repository's .pre-commit-config.yaml.

Releasing this repository

Each action tests itself against fixtures/ in its own .forgejo/workflows/test-<action>.yml, so a failure points at one action. Callers follow main: a fix reaches every repository as soon as it is merged here, and a change is only merged when every action's self-test is green. So merging is the release.

Tags (v1.0.0, v1.0.1, ...) are immutable snapshots. A repository that needs a hard guarantee can pin one. Do not move a tag.

A breaking change to an input must update its callers in the same round of MRs.