ci: drop the :main tag — main builds publish only the immutable :<sha>
:latest (release-only) is the single production pointer; a :main moving tag just duplicated it. main pushes still gate + build (the :<sha> image is the rollback point), but no longer publish a :main alias. The tag was new and unreferenced, so nothing depends on it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,15 +1,15 @@
|
|||||||
# CI runs first; build only proceeds if all checks pass.
|
# CI runs first; build only proceeds if all checks pass.
|
||||||
#
|
#
|
||||||
# Push to dev: typecheck + lint + test + build :dev + :<sha>
|
# Push to dev: typecheck + lint + test + build :dev + :<sha>
|
||||||
# Push to main: typecheck + lint + test + build :main + :<sha>
|
# Push to main: typecheck + lint + test + build :<sha> (no moving tag)
|
||||||
# Tag v* (release): typecheck + lint + test + build :latest + :<version> + :<sha>
|
# Tag v* (release): typecheck + lint + test + build :latest + :<version> + :<sha>
|
||||||
#
|
#
|
||||||
# Both dev and main are gated AND built: dev is the working line, main the
|
# Both dev and main are gated AND built. dev pushes move the :dev tag; main
|
||||||
# protected/integration line, each its own deployable image (:dev / :main).
|
# pushes publish only the immutable :<sha> image — no :main tag, because
|
||||||
# Running CI again on the main merge commit is intentional — main is
|
# :latest (release-only) is the single production pointer and a :main alias
|
||||||
# validated and built in its own right. The v* release tag is the ONLY
|
# would just duplicate it. Running CI on the main merge commit is intentional:
|
||||||
# trigger that publishes :latest (the production pointer) plus the
|
# main is validated and its :<sha> image is the rollback point. The v* release
|
||||||
# immutable :<version> tag.
|
# tag is the ONLY trigger that publishes :latest plus the immutable :<version>.
|
||||||
#
|
#
|
||||||
# Successive pushes to the SAME ref supersede each other (see concurrency
|
# Successive pushes to the SAME ref supersede each other (see concurrency
|
||||||
# below), so rapid pushes don't stack identical work; dev and main runs are
|
# below), so rapid pushes don't stack identical work; dev and main runs are
|
||||||
@@ -142,7 +142,7 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
name: Build & push image
|
name: Build & push image
|
||||||
needs: [typecheck, lint, test]
|
needs: [typecheck, lint, test]
|
||||||
# Build on dev, main, and v* tag pushes. dev → :dev, main → :main,
|
# Build on dev, main, and v* tag pushes. dev → :dev, main → (sha only),
|
||||||
# tag → :latest + :<version>; every build also gets an immutable :<sha>.
|
# tag → :latest + :<version>; every build also gets an immutable :<sha>.
|
||||||
if: github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
|
if: github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
|
||||||
runs-on: python-ci
|
runs-on: python-ci
|
||||||
@@ -171,7 +171,8 @@ jobs:
|
|||||||
TAGS="$TAGS,${{ env.IMAGE }}:dev"
|
TAGS="$TAGS,${{ env.IMAGE }}:dev"
|
||||||
;;
|
;;
|
||||||
refs/heads/main)
|
refs/heads/main)
|
||||||
TAGS="$TAGS,${{ env.IMAGE }}:main"
|
# main publishes only the immutable :<sha> image (set above) —
|
||||||
|
# no :main tag; :latest (release-only) is the production pointer.
|
||||||
BUILD_VERSION="main"
|
BUILD_VERSION="main"
|
||||||
;;
|
;;
|
||||||
refs/tags/*)
|
refs/tags/*)
|
||||||
|
|||||||
Reference in New Issue
Block a user