feat(ci): adopt ST release versioning and git tagging - #14
Merged
Conversation
Aligns the distroless build with startree-dex's st-release.yml scheme: an
upstream base version plus a StarTree build number.
base_version 0.49.0 + build_number 1 -> v0.49.0-ST-1
Input changes:
- version + tag_suffix -> base_version (default 0.49.0) + build_number
- new tag_latest toggle (default true) to also push :latest
The build still uses the plain upstream version to name the tarball, because
the Makefile writes vector-${VERSION}-<triple>.tar.gz and the distroless
Dockerfile globs `vector-0*`. The ST suffix belongs to the image tag only. A
warning is emitted if base_version disagrees with Cargo.toml on the built ref.
Adds a `release` job that creates and pushes an annotated git tag, and writes
a step summary of what shipped. Unlike the dex workflow it tags *after* a
successful publish rather than before the build, so a failed build cannot
leave an orphan release tag. To catch the common mistake early, `metadata`
fails in seconds if the release tag already exists rather than after a
90-minute build.
Needs contents: write for the tag push.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
git_ref duplicated what workflow_dispatch already provides. The Run workflow branch selector sets github.ref, and actions/checkout with no `ref:` defaults to it, so the branch dropdown is now the single source of truth for what gets built. Removes the footgun of dispatching from one branch while building another. Also drops `repository: startreedata/vector` from the checkout steps -- with git_ref gone it was redundant, and naming a repository explicitly changes how checkout resolves a missing ref. tag_latest removed; :latest is now always pushed alongside the versioned tag, matching startree-dex's st-release.yml. `push: false` still covers dry runs. concurrency, the Cargo.toml mismatch warning, and the run summary now use github.ref_name. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.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 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.
Aligns the distroless build workflow with the release scheme used by
startree-dex/st-release.yml: an upstream base version plus a StarTree build number.Inputs
base_version0.49.0build_number1pushReplaces the old
version/tag_suffixpair. Each release pushes.../vector:v<base>-ST-<n>and.../vector:latest, and creates a matching annotated git tag on the built commit.v0.49.0-ST-1.../vector:v0.49.0-ST-1,.../vector:latestv0.49.0-ST-2.../vector:v0.49.0-ST-2,.../vector:latestv0.57.0-ST-1.../vector:v0.57.0-ST-1,.../vector:latestNo
git_refinputThe branch to build comes from the Run workflow dropdown.
workflow_dispatchalready setsgithub.ref, andactions/checkoutwith noref:defaults to it, so the dropdown is the single source of truth. A separategit_refinput duplicated that and allowed dispatching the workflow definition from one branch while building source from another - a real footgun.repository: startreedata/vectorwas dropped from the checkout steps at the same time: it was only there to pair withgit_ref, and naming a repository explicitly changes howcheckoutresolves a missingref.New
releasejobCreates and pushes the annotated git tag and writes a run summary. Needs
permissions: contents: write.Two deliberate differences from the dex workflow
Tagging happens after publish, not before the build. Dex creates the git tag as an early step; here
releaserunsneeds: [metadata, build, publish], so a failed build cannot leave an orphan tag pointing at something never shipped.metadatafails fast if the tag already exists. Reusing a build number is the obvious mistake, and without this you would not find out untilgit push origin <tag>at the very end - after ~90 minutes of build time. This is whymetadatachecks out withfetch-depth: 0.Note on the build version
The build uses the plain upstream version to name the tarball. The Makefile writes
vector-${VERSION}-<triple>.tar.gzand the distroless Dockerfile globsvector-0*, so the-ST-Nsuffix stays out ofVERSIONand belongs to the image tag only.metadatawarns ifbase_versiondisagrees withCargo.tomlon the branch being built.Follow-up
values.yamlinstartree-metrics-agentpinsv0.43.0-multiarch. New releases use-ST-N, so that pin needs updating to whatever the first release cuts.🤖 Generated with Claude Code