fix(ci): derive publish channel from trigger to end 409 race #26
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/GOV-14-trigger-derived-publish-channels"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Background
Each build-binary workflow (
build-binary-linux.yml,build-binary-windows.yml) triggers onpushto BOTHbranches: [main]andtags: [v*]. A release commit is simultaneously a push to main and thev*tag push, so both events fire. Each run resolved its publish tag set fromgit describeviaoci-build/get-tags.nu --joined, which on a tagged commit yields[<version>, latest]for BOTH events. The two runs then raced to DELETE-then-PUT the SAME immutable generic-package file at the<version>channel, producing intermittent409 package file already existsand red release CI. This is GOV-13 / CLAUDE-122.Fix
Resolve the publish channel from the workflow TRIGGER instead of
git describe, so the two events publish DISJOINT channels: a tag push (github.ref_type == 'tag') publishes the<version>channel (github.ref_name), and a push to main publishes ONLYlatest. This removes the concurrent writer on the immutable<version>file.lateststill tracks the release commit because the tag sits on the same SHA pushed to main. Mirrors the fix proven in CI on the monkey repo (PR #51).The change is confined to the
Get artifact tagsstep in each workflow; downstream publish and print steps that iterate the channel list are unchanged.umbra'sget-tags.nuonly ever emitted<version>andlatest, so there are no additional release-only channels to preserve.Files
.forgejo/workflows/build-binary-linux.yml.forgejo/workflows/build-binary-windows.ymlVerification
just pre-commitpasses locally (fmt + clippy + build + tests). The change is YAML-only; no source code touched.Refs GOV-14, GOV-13, CLAUDE-122.