feat: update build workflow to create and publish all-in-one Docker image on approved PRs
Some checks failed
CI / Frontend Tests (pull_request) Has been cancelled
CI / Backend Tests (pull_request) Has been cancelled

This commit is contained in:
2026-03-27 16:18:25 -03:00
parent 6305a8e95e
commit d6de131a9b
4 changed files with 29 additions and 13 deletions

View File

@@ -22,7 +22,7 @@ You are a senior DevOps / infrastructure engineer and software architect for the
| `docker/supervisord.conf` | Supervisor config (manages postgres + java + nginx inside allinone) |
| `docker/entrypoint.sh` | Allinone container entrypoint (DB init, env wiring, supervisord start) |
| `.gitea/workflows/ci.yml` | CI: backend tests + frontend tests on pull requests to `develop` |
| `.gitea/workflows/build.yml` | Build: create the local all-in-one image on approved PRs to `main` |
| `.gitea/workflows/build.yml` | Build: create and publish the all-in-one image on approved PRs to `main` |
| `.env.example` | Template for all environment variables |
## System Topology
@@ -81,9 +81,9 @@ All injected at runtime — never hardcoded in images.
| Workflow | Trigger | What it does |
|---|---|---|
| `ci.yml` | Pull request to `develop` | Backend `./gradlew test` + Frontend `npm run test` |
| `build.yml` | Approved PR review to `main` | Builds `condado-newsletter` on the target Docker host |
| `build.yml` | Approved PR review to `main` | Builds `condado-newsletter` on the target Docker host, then pushes `latest` and `${github.sha}` tags to Gitea container registry |
The runner shares the target Docker host, so this workflow produces the local `condado-newsletter` image directly on that host. `docker-compose.prod.yml` must reference that image and not local build directives.
The runner shares the target Docker host, so this workflow builds the image locally, tags it for `gitea.lab/sancho41/condado-newsletter`, and pushes it to Gitea container registry. `docker-compose.prod.yml` must reference that published image and not local build directives.
## Implementation Rules