fix(ci): require explicit latest promotion on manual tag builds
This commit is contained in:
1 parent
406fcc2e52
commit
fd7fc29d11
2 files changed
+10
-5
No files matched your search
@@ -56,7 +56,7 @@ jobs:
|
||||
id: promotion
|
||||
run: |
|
||||
PROMOTE=false
|
||||
if [ "${{ github.ref_type }}" = "tag" ] || [ "${{ github.event.inputs.promote_latest }}" = "true" ]; then
|
||||
if { [ "${{ github.event_name }}" = "push" ] && [ "${{ github.ref_type }}" = "tag" ]; } || [ "${{ github.event.inputs.promote_latest }}" = "true" ]; then
|
||||
git fetch origin maintained-stable
|
||||
if git merge-base --is-ancestor HEAD FETCH_HEAD; then
|
||||
PROMOTE=true
|
||||
|
||||
@@ -89,15 +89,20 @@ O pipeline é orquestrado via `.gitea/workflows/docker-build.yml`:
|
||||
publicação de:
|
||||
- `git.jf.eng.br/jfeng/evogo:<versão>-<sha7>` (imutável)
|
||||
- `git.jf.eng.br/jfeng/evogo:<versão>`
|
||||
Se o commit já estiver em `maintained-stable`, promove também `latest`
|
||||
e confere seu digest após publicar as imagens versionadas.
|
||||
3. **`workflow_dispatch`:** publica apenas com `publish_image=true`; `:latest`
|
||||
só com `promote_latest=true`.
|
||||
|
||||
### Gerar um release
|
||||
|
||||
```bash
|
||||
git checkout maintained-develop && git pull
|
||||
git tag -a v0.7.2-evogo.1 -m "EvoGO 0.7.2-evogo.1"
|
||||
git push origin v0.7.2-evogo.1 # dispara o build e a publicação
|
||||
# Após validar em maintained-develop e aprovar a promoção do commit:
|
||||
git checkout maintained-stable
|
||||
git pull --ff-only
|
||||
# Integrar o commit validado pelo processo de revisão antes de criar a tag.
|
||||
git tag -a v0.7.3-evogo.1 -m "EvoGO 0.7.3-evogo.1"
|
||||
git push origin v0.7.3-evogo.1 # publica versão, tag imutável e latest
|
||||
```
|
||||
|
||||
### Usar no docker-compose
|
||||
@@ -137,7 +142,7 @@ Ordem de publicação: validar a branch de manutenção, integrar em
|
||||
commit validado a `maintained-stable` e então criar a tag
|
||||
`v0.7.3-evogo.1` nesse commit. A publicação exige aprovação humana.
|
||||
|
||||
O workflow de build executa vet e testes antes de publicar. Para tags `v*`
|
||||
O workflow de build executa vet e testes antes de publicar. Para pushes de tags `v*`
|
||||
cujo commit esteja em `maintained-stable`, publica as tags semântica e imutável,
|
||||
promove `latest` e exige que o digest remoto seja igual ao da tag imutável.
|
||||
A promoção e o build compartilham o grupo de concorrência `promote-latest`.
|
||||
|
||||
Reference in new issue
Block a user