fix(ci): derive publish channel from trigger to end 409 race #39
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?
Problem
.forgejo/workflows/build-windows.ymltriggers on push to BOTHbranches: [main]andtags: [v*]. A release commit is simultaneously a push to main and thev*tag push, so both events fire. Both runs resolved their 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 exists(CLAUDE-122 / GOV-13) and red release CI.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 (the tag name); a push to main publishes ONLYlatest. This removes the concurrent writer on the immutable<version>generic-package file.lateststill tracks the release commit because the tag sits on the same SHA pushed to main.The change is confined to the
Get artifact tagsstep; the downstream publish and print steps that loop over the resolved channels are unchanged. This repo has no release-only channels beyond<version>andlatest, so the mapping is exactly tag-push -><version>, main-push ->latest.This mirrors the fix proven in CI on the
monkeyrepo (PR #51).Validation
just pre-commit(fmt + clippy + build + test in the CI builder image) passes. The change is YAML-only; no source code touched.#GOV-14
#GOV-13
#CLAUDE-122