CORE-4786 make dev and main tags usable by flux#145
Merged
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
Member
Author
|
I have read the CLA Document and I hereby sign the CLA |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an opt-in timestamp component to dev/main/master branch image tags so Flux image automation can sort tags and select the newest build, while preserving the legacy <prefix>-<short-sha> format by default.
Changes:
- Introduces a new
docker-tag-timestampaction input (defaultfalse) to generate sortable branch tags:<prefix>-<utc-timestamp>-<short-sha>. - Refactors tag generation logic in
scripts/generate-tags.shvia abranch_taghelper. - Extends Bats tests and documents the new tag format and Flux policy guidance in the README.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
scripts/generate-tags.sh |
Adds branch_tag helper to optionally insert a UTC timestamp into branch tags. |
action.yml |
Adds docker-tag-timestamp input and wires it to INPUT_DOCKER_TAG_TIMESTAMP env var. |
tests/generate-tags.bats |
Adds deterministic tests for timestamped branch tags and ensures prod tags remain unchanged. |
README.md |
Documents the new input and provides guidance for Flux image automation policies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: André Bauer <andre.bauer@staffbase.com>
6c940df to
4ee0924
Compare
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
harikaduyu
approved these changes
Jun 2, 2026
ricoberger
approved these changes
Jun 3, 2026
Co-authored-by: Harika <61228712+harikaduyu@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
Description
Add opt-in timestamp suffix to branch tags for Flux image automation
Why
Flux's image automation needs image tags it can order to pick the newest build. Our current branch tags (
dev-36423e42,main-525f80d8) suffix the Git SHA, which isn't sortable — Flux can't tell which build is newer. Prod CalVer tags (2025.50.14) are already orderable via SemVer.This adds an opt-in timestamp component to
dev/main/masterbranch tags so they become sortable, while keeping the short SHA for traceability.What
docker-tag-timestamp(defaultfalse). Whentrue, branch tags become<prefix>-<YYYYMMDDHHMMSS-UTC>-<short-sha>, e.g.dev-20260602143055-36423e42.<prefix>-<short-sha>format. No breaking change.v*) tags and non-pushed feature-branch tags are untouched regardless of the flag.docker-tag-timestamp: 'true'devdev-<sha>dev-<timestamp>-<sha>main/mastermain-<sha>main-<timestamp>-<sha>v*(prod)2025.50.14Flux usage
With the flag enabled, one
ImagePolicyper environment:Checklist