mikkeli 580ef2109e feat(songs): LRC file upload and footer link
For songs with an `lrc` field in frontmatter:
- Verifies the file exists and is valid UTF-8 (warns and skips otherwise)
- Uploads to wiki as `File:<title>.lrc` via MediaWiki file API
- Idempotent: skips upload if SHA1 matches existing wiki file
- Appends `[[Media:<title>.lrc|Synced lyrics (.lrc)]]` before the
  category tag at the bottom of the wiki page

Songs without `lrc` in frontmatter are unaffected.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-09 23:11:00 +09:00
2026-06-09 00:03:55 +00:00

novoyuuparosk-auto-wiki

CI/CD pipelines that auto-apply commits to https://wiki.novoyuuparosk.org from upstream content repos.

Pipelines

Path Source repo Purpose Status
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 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       <- workflow: installs deps, clones this repo, runs renderer

novoyuuparosk-auto-wiki/             <- this repo
  .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

Bot identity

MediaWiki BotPassword issued for user Dubrowski, bot name giteaAutomaton.

Login as Dubrowski@giteaAutomaton with password d8jua48t65jgjp3dfcqhfg7257tri6ui. (Legacy form: username Dubrowski, password giteaAutomaton@d8jua48t65jgjp3dfcqhfg7257tri6ui.)

Plaintext here is acceptable for the current phase (private repo, home-Pi LAN-only Gitea). Rotate before any of those preconditions change. Note that git log retains this string forever, so rotation requires a wiki-side BotPassword regeneration regardless of what happens to this file.

Runner infrastructure

One act_runner instance serves all pipelines. Runs on a Pi 5 (Raspberry Pi OS Bookworm, aarch64) inside the same docker-compose stack that hosts the Gitea instance. Job execution is via the host Docker socket — runner is a container, jobs spawn as sibling containers.

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.

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 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

  • This repo: automation/<pipeline-name> for pipeline-development branches (e.g., automation/songs).
  • Source repos: each pipeline's README defines the source-side branch convention (e.g., autowiki/<song-slug> in ncmr-songs).

Decisions log (cross-cutting)

Decision Value Date
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.

Setup checklist (cross-cutting)

Via the Gitea web UI logged in as mikkeli:

  • User-scoped secrets and variables set per Gitea Actions setup above
    • WIKI_BOT_USER
    • WIKI_BOT_PASSWORD
    • FAPAT (Full-Access PAT — value not stored in this README; saved directly into the Gitea secret. Regenerate if lost.)
    • WIKI_BASE_URL
    • WIKI_API_URL
    • 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, 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/.

S
Description
CI/CD or in English auto-apply pipelines for the wiki
Readme WTFPL 270 KiB
Languages
Python 97.7%
Dockerfile 2.3%