--- created: 2026-06-10T00:48:16.555Z title: Gitea CI — full regression on PR to main + build/publish Docker image area: tooling resolves_phase: 8 files: - docker-compose.yml - docker-compose.dev.yml - apps/api/Dockerfile --- ## Problem The repo is committed against a self-hosted Gitea instance with a registered Actions runner, but there is no CI yet (no `.gitea/workflows/` or `.github/workflows/`). Two things should run automatically: 1. **Full regression testing** on every PR targeting `main` — gate the merge. 2. **Build the app's Docker image and publish it to the Gitea container registry.** Open context / decisions to make when picking this up: - **Test scope:** "full regression" = lint + typecheck + unit + the API integration tests. Those integration tests need a real MariaDB (see [[api-integration-test-db]]) — the workflow must spin up a MariaDB service container, bind it, and set `DB_HOST=127.0.0.1` + `.env` creds. The PWA build/test also needs to run. - **Monorepo:** pnpm workspace (`apps/api`, `apps/pwa`, shared). Cache the pnpm store. - **Docker images:** only `apps/api/Dockerfile` exists today — there is no PWA Dockerfile yet. Decide whether to publish one image (API) or also build/serve the PWA. Tag scheme + when to publish (only on merge to `main`? on tags? per-PR?). - **Registry auth:** push to the Gitea registry using the runner's `GITHUB_TOKEN`/ Gitea-provided token or a dedicated package-write token. - Gitea Actions are GitHub-Actions-compatible syntax but run on the self-hosted runner — confirm runner labels and available images. ## Solution TBD — likely a `.gitea/workflows/ci.yml`: - `on: pull_request` (to `main`) → job: install (pnpm), lint, typecheck, unit tests, API integration tests against a `mariadb` service container, PWA build. - `on: push` to `main` (or tag) → job: `docker build` `apps/api/Dockerfile`, login to Gitea registry, push tagged image. Verify Gitea Actions enablement + runner is healthy before authoring. Decide image matrix (API only vs. API+PWA) and tag policy first.