docs: update all docs to reflect v1 live state

- template_auto_generated.wikitext: generated_at → commit parameter
- SCHEMA.md: same banner fix; clarify that frontmatter-less files are
  silently skipped, not errors
- pipelines/songs/README.md: full rewrite — v1 live status, self-
  contained workflow pattern, correct env table, modes, one-off setup
  marked done, full decisions log
- README.md: architecture reflects actual pattern (no workflow_call),
  URL_TO_GITEA variable added, setup checklist marked complete, host
  network mode documented

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-09 18:39:13 +09:00
parent cf6567cd77
commit afc6a62791
4 changed files with 62 additions and 54 deletions
+23 -15
View File
@@ -6,24 +6,26 @@ CI/CD pipelines that auto-apply commits to https://wiki.novoyuuparosk.org from u
| Path | Source repo | Purpose | Status |
|---|---|---|---|
| [`pipelines/songs/`](pipelines/songs/) | `mikkeli/ncmr-songs` | Song lyric pages | in development (v1, no executable code yet) |
| [`pipelines/songs/`](pipelines/songs/) | `mikkeli/ncmr-songs` | Song lyric pages | v1 live |
Per-pipeline READMEs cover everything specific to that pipeline (source schema, renderer, runtime, decisions). This root README covers only what's cross-cutting.
## Architecture
Hybrid layout. The Gitea Actions trigger has to live in the source repo (Gitea only fires workflows from `.gitea/workflows/` of the pushed-to repo); the real logic lives here. Source-repo workflows are thin stubs that call reusable workflows defined here.
Hybrid layout. The Gitea Actions trigger must live in the source repo (Gitea only fires workflows from `.gitea/workflows/` of the pushed-to repo); the rendering logic lives here. The source-repo workflow is self-contained but clones this repo at runtime to get the renderer.
```
<source-repo>/
.gitea/workflows/<name>.yml <- thin stub, calls into this repo
.gitea/workflows/<name>.yml <- workflow: installs deps, clones this repo, runs renderer
novoyuuparosk-auto-wiki/ <- this repo
.gitea/workflows/<pipeline>.yml <- reusable workflows (the actual logic)
.gitea/workflows/<pipeline>.yml <- reusable workflow stubs (kept for reference; not actively called)
pipelines/<pipeline>/ <- per-pipeline code, schema, templates
lib/ <- shared modules (MediaWiki client, etc.)
```
Note: `workflow_call` across private repos was abandoned — the auto-generated run token is scoped to the triggering repo only and cannot clone a private callee. The source-repo workflow clones this repo directly using `FAPAT`.
## Wiki
- Base URL: https://wiki.novoyuuparosk.org
@@ -44,6 +46,8 @@ One `act_runner` instance serves all pipelines. Runs on a Pi 5 (Raspberry Pi OS
`act_runner` build: `linux-arm64`, from the `gitea/act_runner` Docker image.
Container network mode: `host` — required so job containers can reach `localhost:3005` (Gitea) and resolve mDNS hostnames.
## Gitea Actions setup (cross-cutting)
Secrets and variables are scoped to user `mikkeli` (no orgs on this instance), inherited by all repos under that account.
@@ -51,11 +55,12 @@ Secrets and variables are scoped to user `mikkeli` (no orgs on this instance), i
**Secrets:**
- `WIKI_BOT_USER` = `Dubrowski@giteaAutomaton`
- `WIKI_BOT_PASSWORD` = the value from *Bot identity* above
- `FAPAT` = Full-Access PAT under `mikkeli`, used by source-repo shim workflows to clone this repo at workflow time
- `FAPAT` = Full-Access PAT under `mikkeli`, used by source-repo workflows to clone this repo at runtime
**Variables:**
- `WIKI_BASE_URL` = `https://wiki.novoyuuparosk.org`
- `WIKI_API_URL` = `https://wiki.novoyuuparosk.org/api.php`
- `URL_TO_GITEA` = Gitea instance base URL (e.g. `http://localhost:3005`). Named with `URL_TO_` prefix — Gitea blocks variable names starting with `GITEA_` or `GITHUB_`.
## Branch naming
@@ -66,12 +71,14 @@ Secrets and variables are scoped to user `mikkeli` (no orgs on this instance), i
| Decision | Value | Date |
|---|---|---|
| Architecture | Hybrid: stub in source repo, logic in this repo via reusable workflows | 2026-06-09 |
| Workflow pattern | Gitea reusable workflows (`workflow_call`); requires Gitea ≥ 1.20 — confirmed 1.25+ | 2026-06-09 |
| Architecture | Hybrid: source-repo workflow clones this repo at runtime for the renderer | 2026-06-09 |
| Workflow pattern | Self-contained (not `workflow_call`) — cross-repo `workflow_call` blocked by token scoping on private repos | 2026-06-09 |
| Runner execution | Docker, added as a service to the existing Gitea docker-compose | 2026-06-09 |
| Runner network mode | `host` — job containers need to reach Gitea on localhost | 2026-06-09 |
| Secret/runner scope | User-level on `mikkeli` (no orgs on this instance) | 2026-06-09 |
| MediaWiki API path | `api.php` (classic action API) | 2026-06-09 |
| Branch naming (this repo) | `automation/<pipeline>` for pipeline-development branches | 2026-06-09 |
| Variable naming | `URL_TO_GITEA` not `GITEA_URL` — Gitea blocks `GITEA_`/`GITHUB_` prefixes | 2026-06-09 |
Per-pipeline decisions live in each pipeline's README.
@@ -79,16 +86,17 @@ Per-pipeline decisions live in each pipeline's README.
Via the Gitea web UI logged in as `mikkeli`:
- [v] User-scoped secrets and variables set per *Gitea Actions setup* above
- [v] `WIKI_BOT_USER`
- [v] `WIKI_BOT_PASSWORD`
- [v] `FAPAT` (Full-Access PAT — value not stored in this README; saved directly into the Gitea secret. Regenerate if lost.)
- [v] `WIKI_BASE_URL`
- [v] `WIKI_API_URL`
- [x] User-scoped secrets and variables set per *Gitea Actions setup* above
- [x] `WIKI_BOT_USER`
- [x] `WIKI_BOT_PASSWORD`
- [x] `FAPAT` (Full-Access PAT — value not stored in this README; saved directly into the Gitea secret. Regenerate if lost.)
- [x] `WIKI_BASE_URL`
- [x] `WIKI_API_URL`
- [x] `URL_TO_GITEA`
With Pi access:
- [ ] Add `act_runner` service to the existing Gitea docker-compose
- [ ] Generate a runner registration token at `/-/admin/actions/runners` (or `/user/settings/actions/runners` if user-scoped runners are exposed), bake into the compose env, `docker compose up -d act_runner`, confirm "online" in the Gitea UI
- [x] Add `act_runner` service to the existing Gitea docker-compose
- [x] Generate a runner registration token at `/-/admin/actions/runners`, bake into the compose env, `docker compose up -d act_runner`, confirm "online" in the Gitea UI
Per-pipeline setup lives in each pipeline's README. Start with [`pipelines/songs/`](pipelines/songs/).