refactor: migrate CI/CD workflows from GitHub Actions to Gitea Actions and remove legacy workflows
This commit is contained in:
40
CLAUDE.md
40
CLAUDE.md
@@ -83,8 +83,8 @@ The cycle for every step is:
|
||||
| Reverse Proxy | Nginx (serves frontend + proxies `/api` to backend) |
|
||||
| Dev Mail | Mailhog (SMTP trap + web UI) |
|
||||
| All-in-one image | Single Docker image: Nginx + Spring Boot + PostgreSQL + Supervisor |
|
||||
| Image registry | Docker Hub (`<dockerhub-user>/condado-newsletter`) |
|
||||
| CI/CD | GitHub Actions — build, test, push to Docker Hub on merge to `main` |
|
||||
| Image registry | Not configured (legacy Docker Hub publish workflow removed) |
|
||||
| CI/CD | Gitea Actions — run backend/frontend tests on pull requests to `develop` |
|
||||
|
||||
## Deployment Flavours
|
||||
|
||||
@@ -104,7 +104,7 @@ The all-in-one image (`Dockerfile.allinone`) bundles **everything** into a singl
|
||||
- **PostgreSQL** — embedded database
|
||||
- **Supervisor** — process manager that starts and supervises all three processes
|
||||
|
||||
This image is published to Docker Hub at `<dockerhub-user>/condado-newsletter:latest`.
|
||||
The all-in-one image is built locally or in external pipelines as needed (no default registry publish workflow in-repo).
|
||||
|
||||
**Minimal `docker run` command:**
|
||||
```bash
|
||||
@@ -121,7 +121,7 @@ docker run -d \
|
||||
-e IMAP_PORT=993 \
|
||||
-e APP_RECIPIENTS=friend1@example.com,friend2@example.com \
|
||||
-v condado-data:/var/lib/postgresql/data \
|
||||
<dockerhub-user>/condado-newsletter:latest
|
||||
<registry-or-local-image>/condado-newsletter:latest
|
||||
```
|
||||
|
||||
The app is then available at `http://localhost`.
|
||||
@@ -218,8 +218,10 @@ condado-news-letter/ ← repo root
|
||||
│
|
||||
├── .github/
|
||||
│ └── workflows/
|
||||
│ ├── ci.yml ← run tests on every PR
|
||||
│ └── publish.yml ← build & push all-in-one image to Docker Hub on main merge
|
||||
│ └── (legacy, unused after Gitea migration)
|
||||
├── .gitea/
|
||||
│ └── workflows/
|
||||
│ └── ci.yml ← run tests on pull requests targeting `develop`
|
||||
│
|
||||
├── backend/ ← Spring Boot (Kotlin + Gradle)
|
||||
│ ├── build.gradle.kts
|
||||
@@ -522,13 +524,17 @@ BODY:
|
||||
|
||||
## Git Workflow & CI/CD
|
||||
|
||||
- Branch naming: `feature/<short-description>`, `fix/<short-description>`, `chore/<short-description>`
|
||||
- Git hosting: Gitea instance at `http://gitea.lab`.
|
||||
- Canonical remote: `origin = http://gitea.lab/sancho41/condado-newsletter.git`.
|
||||
- Branch model: **Git Flow** (`main` + `develop` as permanent branches).
|
||||
- Branch naming: `feature/<short-description>`, `fix/<short-description>`, `hotfix/<short-description>`, `release/<short-description>`, `chore/<short-description>`
|
||||
- Commit messages follow [Conventional Commits](https://www.conventionalcommits.org/): `feat:`, `fix:`, `chore:`, `docs:`, `test:`
|
||||
- Scope your commits: `feat(backend):`, `feat(frontend):`, `chore(docker):`
|
||||
- **TDD commit order per step:** first `test(<scope>): add failing tests for <step>`, then
|
||||
`feat(<scope>): implement <step> — all tests passing`.
|
||||
- PRs require all CI checks to pass before merging.
|
||||
- Never commit directly to `main`.
|
||||
- Pull requests must target `develop` for regular work.
|
||||
- CI runs on pull requests to `develop` and must pass before merge.
|
||||
- Never commit directly to `main` or `develop`.
|
||||
|
||||
### Commit Rules (enforced by AI)
|
||||
|
||||
@@ -564,23 +570,13 @@ Good examples:
|
||||
- `feat(frontend): implement step 2 - per-entity scheduled task creation`
|
||||
- `docs(config): clarify english-first language policy and commit quality rules`
|
||||
|
||||
### GitHub Actions Workflows
|
||||
### Gitea Actions Workflows
|
||||
|
||||
| Workflow file | Trigger | What it does |
|
||||
|----------------------------|----------------------------|-----------------------------------------------------------|
|
||||
| `.github/workflows/ci.yml` | Push / PR to any branch | Backend tests (`./gradlew test`) + Frontend tests (`npm run test`) |
|
||||
| `.github/workflows/publish.yml` | Push to `main` | Builds `Dockerfile.allinone`, tags as `latest` + git SHA, pushes to Docker Hub |
|
||||
| `.gitea/workflows/ci.yml` | PR to `develop` | Backend tests (`./gradlew test`) + Frontend tests (`npm run test`) |
|
||||
|
||||
**Required GitHub Secrets:**
|
||||
|
||||
| Secret | Description |
|
||||
|-----------------------|--------------------------------------------|
|
||||
| `DOCKERHUB_USERNAME` | Docker Hub account username |
|
||||
| `DOCKERHUB_TOKEN` | Docker Hub access token (not password) |
|
||||
|
||||
**Image tags pushed on every `main` merge:**
|
||||
- `<dockerhub-user>/condado-newsletter:latest`
|
||||
- `<dockerhub-user>/condado-newsletter:<git-sha>` (for pinning)
|
||||
Current policy: old publish/version automation workflows were removed during the Gitea migration.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user