ci: add gitea actions for quality checks and versioned images
- run server lint, type-check, tests and build, and client lint, build and storybook tests on master and pull requests - when a push to master changes the package.json version, build the docker image and push it to the gitea registry tagged with the version and latest - document the workflow and the REGISTRY_TOKEN secret
This commit is contained in:
1 parent
63c2df96f1
commit
f24a1b7dd5
2 files changed
+115
No files matched your search
@@ -218,6 +218,18 @@ docker compose build --no-cache
|
||||
|
||||
---
|
||||
|
||||
## CI (Gitea Actions)
|
||||
|
||||
`.gitea/workflows/ci.yml` runs on pushes to `master` and on pull requests:
|
||||
|
||||
- **server**: lint (no warnings allowed), type-check, tests, build.
|
||||
- **client**: lint (no warnings allowed), build, Storybook tests in headless Chromium.
|
||||
- **image** (pushes to `master` only): when the push changes `version` in the root `package.json`, and both check jobs pass, builds the Docker image and pushes it to the Gitea instance's container registry as `<gitea host>/<owner>/<repo>:<version>` and `:latest`.
|
||||
|
||||
The image job logs in as the repository owner with the `REGISTRY_TOKEN` secret: a Gitea access token with package write access (Settings → Applications → token with `write:package`), added under the repository's Settings → Actions → Secrets. It runs `docker` on the runner, so the runner must give jobs access to a Docker daemon (act_runner mounts the host's Docker socket into job containers by default).
|
||||
|
||||
---
|
||||
|
||||
## Running with Docker Compose
|
||||
|
||||
Start (detached):
|
||||
|
||||
Reference in new issue
Block a user