Build: implement semver tagging and tag/lineage annotations#129
Merged
Conversation
Resolve the release version from the latest published GitHub Release (strip a leading v) and derive the moving major (0) and minor (0.1) tags, the immutable patch tag (0.1.0), and the immutable build tag (0.1.0-<short-sha>). Tag the index with all four and stop publishing the moving latest tag. Set org.opencontainers.image.version to the immutable build tag and add com.toddysm.image.lineage (minor) and com.toddysm.image.tags (all four tags, pipe separated). Pass the build tag to the referrer step via GITHUB_ENV so the SBOM/provenance attachment keys off the immutable tag rather than a fixed SHA. Closes #125
There was a problem hiding this comment.
Pull request overview
Updates the CSSC Dashboard build workflow to tag/publish GHCR images using semver-derived tags from the latest GitHub Release, and to emit new lineage/tag annotations while removing the latest tag.
Changes:
- Resolve the release version via
gh release view, derivemajor,minor,patch, and immutablebuildtags, and push all four tags (nolatest). - Update OCI annotations to set
org.opencontainers.image.versionto the immutable build tag and addcom.toddysm.image.lineage/com.toddysm.image.tags. - Pass the immutable build tag to the referrer/SBOM/provenance publishing step via
GITHUB_ENV.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Distinguish a missing GitHub Release (fail with a clear message) from other gh failures (auth/network/API — fail loudly with the captured error) instead of treating every failure as "no release". Validate that the release tag is a plain x.y.z semantic version before splitting it into the tag set, so unexpected or pre-release tags cannot produce wrong/invalid tags.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Implements #125 (part of #123). Follows the architecture design in #124.
What changed
.github/workflows/build-cssc-dashboard.yml:v;0.1.0currently).major(0) andminor(0.1), immutablepatch(0.1.0), and immutablebuild(0.1.0-<short-sha>).latest.org.opencontainers.image.versionto the immutable build tag.com.toddysm.image.lineage=<minor>andcom.toddysm.image.tags=<major>|<minor>|<patch>|<build>(index + per-platform scope).GITHUB_ENVso the SBOM/provenance attachment keys off the immutable tag.Validation
actionlintclean.shellcheck -S warningclean on both run blocks.Closes #125