Skip to content

Commit afbdef4

Browse files
committed
fix(ci): gate :latest Docker tag to non-beta builds
The shared publish_docker_image.yml template was copied into both public repos by sync-releases — evolution-go (stable) and evolution-go-beta. Every beta build pushed both :X.Y.Z-beta AND :latest to evoapicloud/evolution-go, overwriting the stable :latest with obfuscated beta code. Anyone doing `docker pull evolution-go:latest` between the last beta push and the next stable release was getting beta code in production. Two changes: 1. Tag :latest only when VERSION does not contain "-beta" (via docker/metadata-action enable= condition). Beta builds keep pushing :X.Y.Z-beta; stable builds keep pushing :X.Y.Z + :latest. 2. Drop the `tags: ["*.*.*"]` trigger. sync-releases pushes the branch commit AND the tag simultaneously, which caused a duplicate build per release. The `branches: [main]` trigger alone covers it. This template reaches both public repos on the next sync, so both evolution-go and evolution-go-beta will pick up the fix. Recovery of the currently-contaminated :latest happens automatically on the next stable release push (develop→main merge for v0.7.1).
1 parent 8efff8a commit afbdef4

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

tools/build-dist/templates/.github/workflows/publish_docker_image.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
push:
55
branches:
66
- main
7-
tags:
8-
- "*.*.*"
97

108
jobs:
119
build_deploy:
@@ -31,7 +29,7 @@ jobs:
3129
images: evoapicloud/evolution-go
3230
tags: |
3331
type=raw,value=${{ steps.version.outputs.version }}
34-
type=raw,value=latest
32+
type=raw,value=latest,enable=${{ !contains(steps.version.outputs.version, '-beta') }}
3533
3634
- name: Set up QEMU
3735
uses: docker/setup-qemu-action@v3

0 commit comments

Comments
 (0)