From 05e8e1e9f4612059e597de6303a200834690c6fb Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Thu, 21 May 2026 17:18:30 +0000 Subject: [PATCH] ci(images): publish chronologically-orderable master-- tags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The existing master push pipeline produces `master` (rolling) and `sha-` tags. Neither is orderable by build time, so downstream GitOps that want to auto-bump to the newest master build (e.g. Flux ImagePolicy) can't pick the latest from the tag list — alphabetical sort over hex shas is effectively random, and the rolling `master` tag can't be referenced as an immutable bump target. Add a third tag of the form `master--` (Unix epoch in seconds + short sha), gated on default-branch pushes via metadata- action's `is_default_branch` predicate. The sha is retained for traceability; the epoch makes the tags numerically orderable, so a Flux ImagePolicy like filterTags: pattern: '^master-(?P[0-9]+)-[a-f0-9]+$' extract: '$ts' policy: numerical: order: asc will reliably bump to the newest master build. Applied to both image_build.yml (OCI labels stay consistent) and image_merge.yml (the actual tag publisher via buildx imagetools). --- .github/workflows/image_build.yml | 1 + .github/workflows/image_merge.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/image_build.yml b/.github/workflows/image_build.yml index 96cfebdd8..b953ddbb2 100644 --- a/.github/workflows/image_build.yml +++ b/.github/workflows/image_build.yml @@ -106,6 +106,7 @@ jobs: type=ref,event=branch type=semver,pattern={{raw}} type=sha + type=raw,value={{branch}}-{{date 'X'}}-{{sha}},enable={{is_default_branch}} flavor: | latest=${{ inputs.tag-latest }} suffix=${{ inputs.tag-suffix }},onlatest=true diff --git a/.github/workflows/image_merge.yml b/.github/workflows/image_merge.yml index f667c7d4c..47b3f48a8 100644 --- a/.github/workflows/image_merge.yml +++ b/.github/workflows/image_merge.yml @@ -80,6 +80,7 @@ jobs: type=ref,event=branch type=semver,pattern={{raw}} type=sha + type=raw,value={{branch}}-{{date 'X'}}-{{sha}},enable={{is_default_branch}} flavor: | latest=${{ inputs.tag-latest }} suffix=${{ inputs.tag-suffix }},onlatest=true