Skip to content

Catalog - #5

Merged
fb0sh merged 6 commits into
mainfrom
catalog
Sep 16, 2026
Merged

fb0sh merged 6 commits into
mainfrom
catalog

Conversation

@fb0sh

@fb0sh fb0sh commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Add scripts/content.py as the single implementation for content ids,
image references, OCI/FloatCTF labels, catalog.json and changed-content
detection.

- validate challenges/*, gameboxes/* and events/* metadata
- generate a deterministic catalog.json for the platform
- build OCI labels + GitHub Actions outputs for CI
- migrate existing meta.toml files with difficulty and tags
- add content.yml: PR validation, main build/push, catalog refresh
- add 39 unittest cases with fixtures
- document metadata, images, catalog and publishing flow
- add safe_name (explicit or derived from the directory name) and use it
  for floatctf/<safe_name>:<type>-v<version>; ids such as
  "Cirno's perfect math class" no longer yield illegal repository names
- validate explicit safe_name, report underivable ids, and detect
  duplicate safe_name conflicts per content type
- omit "image" from catalog entries without src/Dockerfile
- reject duplicated content references inside events
- add "catalog --output"; PR CI no longer requires a fresh catalog.json
- publish only from refs/heads/main and refuse to overwrite an existing
  image tag via docker buildx imagetools inspect
- document safe_name, static content and the version bump policy
- 30 new unittest cases (69 total)
- drop the Docker Hub tag existence check (no imagetools inspect): main
  builds and pushes directly, an existing tag is simply overwritten
- remove the immutable-tag / bump-version rules from the README
- only meta.toml and src/** changes below a content directory schedule an
  image build; README.md, attachment/**, solution/**, docs/** and events/**
  no longer do
- rename content_paths to changed_image_paths and update the tests
This repository owns content metadata and catalog.json, nothing else.

- remove every Docker step from the workflow: no setup-buildx, login,
  build-push, build matrix, PUBLISH flag, secrets or image existence check
- drop the workflow_dispatch build_all input
- workflow now only runs validate + unittest + catalog; the catalog bot
  commit stays restricted to main
- remove the CI-only CLI surface from content.py: image-meta, changed,
  changed_image_paths, git diff detection, GitHub Actions outputs and the
  OCI image labels (image_ref and has_dockerfile stay for the catalog)
- drop the matching tests and unused imports (52 tests remain)
- rewrite the README around meta.toml -> scripts/content.py -> catalog.json
  -> FloatCTF Platform; document that image is metadata only
- sync-event.sh now scans, refreshes the event [content] block and the docs
  and only then runs the full metadata validation, so deleting or renaming a
  challenge/gamebox no longer deadlocks on the stale event reference
- validate the event fields the catalog exposes: title, description,
  started_at and ended_at must be non-empty strings
- static content (no src/Dockerfile) no longer emits "docker" in the catalog
  even when meta.toml declares a [docker] table; container content keeps both
  image and docker
- scan_contents stores content paths relative to root so --root works for
  relative paths other than "."
- 12 new tests, including a sync-event integration test that reproduces the
  old deadlock
@fb0sh
fb0sh merged commit 16812b2 into main Sep 16, 2026
2 checks passed
@fb0sh
fb0sh deleted the catalog branch September 16, 2026 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant