ci: Gitea Actions für Lint, Tests und Image-Build
ci.yml führt bei PRs und Pushes auf main die Upstream-Skripte aus (npm ci inkl. Build, lint:dry, stylelint:dry, test). image.yml baut das unveränderte Upstream-Dockerfile bei Pushes auf main und Tags v* und pusht nach git.morlana.online/f.weber/homebrewery-oidc. .github/ bleibt unverändert. Closes #4 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8c112f50e6
commit
022ae1daef
3 files changed
+186
No files matched your search
@@ -68,6 +68,38 @@ stop for review instead of force-pushing. Never merge `main` into `upstream`.
|
||||
Use a feature branch from current `main` and a reviewed PR for fork changes.
|
||||
Keep credentials in the environment; never put tokens in remote URLs or files.
|
||||
|
||||
## CI and container image
|
||||
|
||||
Fork-owned Gitea Actions workflows live in `.gitea/workflows/`. The upstream CI in
|
||||
`.github/` and `.circleci/` stays untouched (it does not run on Gitea) so upstream
|
||||
merges remain conflict-free.
|
||||
|
||||
| Workflow | Trigger | What it does |
|
||||
| --- | --- | --- |
|
||||
| `ci.yml` | pull requests, push to `main` | `npm ci` (includes the Vite build via `postinstall`), `npm run lint:dry`, `npm run stylelint:dry`, `npm test`. Upstream currently has ESLint warnings but no errors; warnings do not fail the job. The tests need no MongoDB. |
|
||||
| `image.yml` | push to `main`, tags `v*`, manual | builds the unchanged upstream `Dockerfile` and pushes `git.morlana.online/f.weber/homebrewery-oidc` |
|
||||
|
||||
Image tags:
|
||||
|
||||
| Event | Tags |
|
||||
| --- | --- |
|
||||
| push to `main` | `main`, `sha-<7 chars>` |
|
||||
| tag `vX.Y.Z` | `vX.Y.Z`, `latest`, `sha-<7 chars>` (pre-release tags such as `v1.0.0-rc.1` get no `latest`) |
|
||||
|
||||
`buildcache` is the BuildKit layer cache, not a runnable image.
|
||||
|
||||
Runner and repository settings (repository → Settings → Actions):
|
||||
|
||||
- **Runner:** jobs use `runs-on: ubuntu-latest` (public runner, as in the DnD Character Manager).
|
||||
- **Secret `REGISTRY_TOKEN`:** access token of an account with write access to the
|
||||
`f.weber` packages, scope `write:package`. Without it the workflow falls back to the
|
||||
automatic `GITEA_TOKEN`, which may not be allowed to push packages.
|
||||
- **Variable `REGISTRY_USER`** (optional): owner of `REGISTRY_TOKEN`; defaults to the repository owner.
|
||||
- **Variable `CI_CACHE`** (optional): `true` enables the npm cache. Leave it unset until the
|
||||
act_runner cache server is reachable from job containers; otherwise every cache step
|
||||
waits for a connection timeout.
|
||||
- **Variable `IMAGE_PLATFORMS`** (optional): defaults to `linux/amd64`.
|
||||
|
||||
## Fork roadmap
|
||||
|
||||
These are planned features, not functionality delivered by the initial import:
|
||||
|
||||
Reference in new issue
Block a user