ci(deploy): add migration job, fix ARM64 builds, remove :latest tags

✅ merged · #14 · Edu-Carone-SA/mike ← Edu-Carone-SA/mike · opened 1mo ago by EduardoCarone · merged 1mo ago by EduardoCarone · self · +219-25 across 1 file · ↗ on GitHub

From the PR description

CI: Migration job + ARM64 fix

O que mudou

  • Migration job: novo job migrate no workflow de deploy. Roda entre o build e o deploy. Builda a imagem db-migrate, executa como ECS one-off task, aguarda exit 0. Em caso de falha, imprime os logs do CloudWatch e falha o pipeline.
  • ARM64 fix: o cluster ECS é ARM64 mas o CI buildava amd64. Adicionado docker/setup-qemu-action e mudado platforms para linux/arm64.
  • :latest removido: ECR tag immutability rejeitava pushes com :latest já existente. Agora só pushamos por SHA.
  • Outros fixes: DEEPSEEK_API_KEY no backend, health check do frontend em /api/health, HOSTNAME=0.0.0.0, URLs trocadas para mike.agov.app, startPeriod 60s no frontend.

Estrutura do workflow

build (push 3 imagens ARM64) → migrate (ECS one-off, exit 0) → deploy (register TDs, update services, smoke)

Como pular migration

No workflow_dispatch, marcar skip_migration: true (quando não houver migrations novas).

Our analysis

Add migration gate and ARM64 deployment builds — read the full analysis →

Think the analysis missed something the PR description covers?

Capture this PR into my fork

Download a Markdown prompt that tells Claude how to port every commit in this PR into your working tree. Run it via claude -p < capture-pull-14.md from inside the repo you want the changes in.

⬇ Download capture-pull-14.md