ci: align Gitea CI/CD + Docker with the notify-bridge template
Adopt the proven notify-bridge pipeline pattern and fix deployment bugs. Workflows: - build.yml: split into parallel frontend / backend / build-image jobs. Run svelte-check + vitest + `go vet ./...` + `go test ./internal/...` (tests were never executed in CI). Use buildx with GHA layer cache and pin Go to 1.25. Quote the `if:` skip-guard so it is valid YAML. - release.yml: gate the release on a passing test job, then build & push the image, then create the Gitea release LAST so a failed image build can no longer leave an orphan release. Use buildx + registry buildcache, a hard registry login (a push failure now fails the release), and auto-generate a changelog between tags. Docker: - Dockerfile: pin golang to 1.25 (matches go.mod's `go 1.25.0`), add BuildKit cache mounts for the module + build caches, an OCI source label, VOLUME /app/data, and a HEALTHCHECK on /readyz. - docker-compose.yml: fix the healthcheck — it targeted POST-only /api/auth/login (405 -> always unhealthy); now /readyz. Point the image name at the Gitea registry tag with build-from-source as the default. - .dockerignore: exclude ~95 MB of stray binaries, logs, env, and CI/doc files from the build context.
This commit is contained in:
+45
-7
@@ -1,9 +1,47 @@
|
||||
# VCS / tooling
|
||||
.git
|
||||
node_modules
|
||||
web/node_modules
|
||||
web/build
|
||||
data
|
||||
*.md
|
||||
plans/
|
||||
.claude/
|
||||
.gitignore
|
||||
.dockerignore
|
||||
.gitea/
|
||||
.github/
|
||||
.claude/
|
||||
.code-review-graph/
|
||||
.vex.toml
|
||||
.facts-sync.json
|
||||
.facts-suggestions.md
|
||||
|
||||
# Node / frontend build artifacts (frontend stage rebuilds web/build)
|
||||
node_modules/
|
||||
web/node_modules/
|
||||
web/build/
|
||||
web/.svelte-kit/
|
||||
|
||||
# Runtime / local data
|
||||
data/
|
||||
.env
|
||||
.env.*
|
||||
*.log
|
||||
|
||||
# Compiled binaries (rebuilt inside the image)
|
||||
tinyforge
|
||||
tinyforge.exe
|
||||
tinyforge-server.exe
|
||||
server.exe
|
||||
docker-watcher
|
||||
docker-watcher.exe
|
||||
docker-watcher.exe~
|
||||
/cli
|
||||
/cli.exe
|
||||
|
||||
# Build/orchestration files not needed inside the image
|
||||
Dockerfile
|
||||
docker-compose.yml
|
||||
Makefile
|
||||
*.example.yaml
|
||||
|
||||
# Docs / planning / design (not needed at runtime)
|
||||
*.md
|
||||
docs/
|
||||
plans/
|
||||
design-mockups/
|
||||
test-data/
|
||||
|
||||
Reference in New Issue
Block a user