Ops lint / actionlint + Python (push) Successful in 11s
Merged 2026-11-24 as Gitea #1 (the migration), #2 (dependency upkeep) and #3 (catalogue batch 4), released as v1.5.0 — deployed by the CI deploy job, tagged signed, the Gitea release published by hand and announced through announce-release at ops v2026.11.2. Its four cron slots are live. The guide records what the move found: an import of code and tags only, gitleaks on a public Sonar key (and on a comment quoting it), Qodana's first finding, osv-scanner's withdrawn advisory and effectiveUntil, the one-job FIFO runner, unsigned squash merges, anonymous logs and statuses for watching CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
65 lines
6.6 KiB
Markdown
65 lines
6.6 KiB
Markdown
# softharbor — migration guide
|
|
|
|
> Written 2026-11-23 against `main` @ `289ab47`. Profile: web (Astro, Cloudflare Workers) with data bots that open issues and pull requests (runbook §5.3). Its docs/12 describes the CI; `ci.yml` is self-contained on purpose (the old reusable broke every run). Shared decisions: [README](README.md).
|
|
|
|
**Done 2026-11-24.** Merged as Gitea #1 (the migration), #2 (dependency upkeep) and #3 (catalogue batch 4);
|
|
released as **v1.5.0**, deployed by the CI `deploy` job and announced through the ops `announce-release.yml`
|
|
(pinned at the new ops tag **v2026.11.2**, `8e6582a`, which carries `ops_ref` and `reusable-qodana.yml`). The site's
|
|
footer, Contact, legal pages, `security.txt` and the `/api/apps.json` attribution name Gitea; "Report a bug" opens a
|
|
prefilled issue on the GitLab mirror (no forms there: one Markdown description; gitlab.com took an 8000-character
|
|
URL and refused 12000 with 400), which changed the Privacy Policy (LEGAL_VERSION 2026-11-24). Its decision log
|
|
entry is D38. What the migration found:
|
|
|
|
- **The import carried code and tags only.** Issues, PRs, releases and Discussions stayed on GitHub; the repo had
|
|
just the labels `dependencies` and `security`. The bots skip a missing label with a notice (Gitea's API attaches
|
|
labels by id and creates none), so `quarantine` and `link-rot` must be created by hand.
|
|
- **The bots** (`quarantine.yml`, `vt-recheck.yml`, `link-check.yml`) go through one tested script,
|
|
`scripts/gitea.mjs` (PRs, dispatches, issues, statuses); the push uses the job token in an `AUTHORIZATION: basic`
|
|
extra header for that one command only. `ci.yml`'s `record` job writes `CI / build|gates (workflow_dispatch)`
|
|
statuses — the poli0981-dev lesson, applied up front. vt-recheck previews print the `security` diff in the log, so
|
|
a data PR's evidence is read without downloading an artifact.
|
|
- **gitleaks** flagged the SonarQube project key in `sonar-project.properties`' history (generic-api-key), and then
|
|
the `.gitleaksignore` comment that quoted it: describe a finding in words, never quote it.
|
|
- **Qodana** (ops reusable, CLI 2026.3.1) caught "Exception used for local control-flow" in the new script on the
|
|
first run; deterministic after that.
|
|
- **osv-scanner 2.7** warns that `ignoreUntil` is deprecated (`effectiveUntil`), and reported the deepmerge skip
|
|
unused: GHSA-gcqx-w48m-w2h4 was **withdrawn** on 2026-11-16.
|
|
- **The runner takes one job at a time, first come first served.** A `main` deploy waited behind two PRs' queued
|
|
jobs (14 in the queue); cancelling a PR's superseded runs moved it up. Expect ~25 minutes from a merge to
|
|
production when PRs are open.
|
|
- **Merging in the UI:** the repository's default merge style is "merge"; pick "Create squash commit" from the
|
|
menu. Gitea has no signing key ("There is no key available to sign this commit"), so squash commits on `main`
|
|
are unsigned — branch protection must not require signatures (the bots cannot sign either).
|
|
- Handy: job logs of a public repo are readable anonymously at `/{owner}/{repo}/actions/runs/{run}/jobs/{job}/logs`,
|
|
and `GET /repos/{owner}/{repo}/commits/{sha}/status` answers without a token — enough to watch CI from a shell.
|
|
- knip 6.48's lefthook plugin calls `lefthook` unused where `.git/hooks` is missing (a git worktree) unless `CI`
|
|
is set.
|
|
|
|
## Decided (2026-11-23)
|
|
|
|
- **D3 — deploys:** a deploy job with `wrangler deploy` from Gitea CI on `main`.
|
|
- **D5 — bot PRs:** `quarantine.yml` and `vt-recheck.yml` keep opening ONE pull request with the job token, then dispatch `ci.yml` and the security caller on its branch through the Gitea API (README, `gh` table), as they did with `gh workflow run`.
|
|
- D6: branch protection on `main` with the checks the ruleset required.
|
|
|
|
## Workflows (`.github/workflows` → `.gitea/workflows`)
|
|
|
|
| File | Today | Do |
|
|
|---|---|---|
|
|
| `ci.yml` | gates + build, Sonar (`SONAR_TOKEN`), upstream `upload-artifact`, job token use | Move; Gitea artifact action; remove Sonar (D1); add the deploy job on `main` pushes (D3), with Cloudflare secrets only in that job |
|
|
| `codeql.yml` | caller of `reusable-codeql.yml@main` (that path is gone: the ops repo's workflows now live in `.gitea/workflows`), cron `31 3 * * 1` | **Delete** → `security.yml` caller (`node: true`), cron **`37 15 * * 2`**. Bots that dispatched `codeql.yml` dispatch the security workflow instead |
|
|
| `link-check.yml` | weekly sweep, ONE tracking issue refreshed or closed with `gh issue …`, cron `43 4 * * 1` | Cron → **`43 14 * * 1`**. `gh issue edit/comment/create/close` → Gitea API (README table), `permissions: issues: write` |
|
|
| `notify.yml` | caller of `announce-release.yml@main` | `.gitea/workflows/announce-release.yml@<ops-sha>` with `ops_ref`, explicit secrets |
|
|
| `qodana.yml` | `qodana-action`, SARIF to code scanning | Caller of `reusable-qodana.yml` (`package-manager` as in the repo, `prepare-command: <pm> exec astro sync` if `qodana.yaml` needs Astro's types); no schedule today, keep it so |
|
|
| `quarantine.yml` | on data pushes + nightly `17 2 * * *`; opens a PR, `gh workflow run ci.yml / codeql.yml`, `gh issue create` | Cron → **`17 13 * * *`**. Branch + PR + dispatch + issue through the Gitea API (README table), `permissions: contents: write, pull-requests: write, issues: write, actions: write` on that job only |
|
|
| `vt-recheck.yml` | daily `41 0 * * *`, `VT_API_KEY`, ONE PR `vt/recheck`, `gh workflow run`, `gh issue create`, upstream `upload-artifact` | Cron → **`59 13 * * *`**; same Gitea API port as quarantine; Gitea artifact action. Check VirusTotal's daily quota still fits one run at that hour |
|
|
|
|
`.github/dependabot.yml` → delete; add `renovate.json`. `.github/CODEOWNERS` → `.gitea/CODEOWNERS` (Gitea reads only the root, `docs/` and `.gitea/`; a pattern without `*` is a regular expression).
|
|
|
|
## Links and docs
|
|
|
|
`README.md` (13), `.github/ISSUE_TEMPLATE/` (`config.yml` 3, `listing_change.yml`, `accessibility.yml`), `ACCESSIBILITY.md` (2), `docs/09_SECURITY_PRIVACY.md` (2), **`public/.well-known/security.txt`** (2: keep `Contact: mailto:security@…`, policy URL → Gitea), the in-app links in `src/components/legal/Accessibility.astro` and the bug-report island with its test `ShBugReport.test.ts` (issues → GitLab), `LICENSE-DATA.md`, `CONTRIBUTING.md`, `docs/03_DATA_FLOW.md`, `docs/05_ALGORITHMS.md`, CLAUDE.md (deploy path). The `github.io` hits in `src/data/apps/*.json` are third-party apps' homepages: data, leave them. `CHANGELOG.md` keeps its history. `SECURITY.md`: GitHub advisories → e-mail (`security@` is already documented).
|
|
|
|
## Secrets
|
|
|
|
Keep: `VT_API_KEY`, `QODANA_TOKEN`, `DISCORD_RELEASES_WEBHOOK`. Create (user level): `CLOUDFLARE_API_TOKEN`, `CLOUDFLARE_ACCOUNT_ID` (D3). Drop: `SONAR_TOKEN`.
|