fix(ci): clean leftover draft nightly releases before recreating#14229
Conversation
The SLSA provenance upload-assets step creates draft releases on the nightly tag, and 'gh release delete nightly' only removes the published release - so draft 'nightly' releases accumulate (seen as draft instead of pre-release). Before recreating the nightly pre-release, delete every release on the nightly tag (drafts included) by id. Signed-off-by: moauto <54212639+mo-auto@users.noreply.github.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe nightly build workflow is updated to explicitly delete all GitHub releases matching the nightly tag by querying the releases API, filtering for tag name "nightly", and deleting each matching release ID before proceeding with existing cleanup steps. Individual deletion errors are suppressed. ChangesCI Nightly Release Cleanup
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
The nightly
Build and Publishleaves draftnightlyreleases lying around instead of a single pre-release, and they accumulate over time.Cause: the SLSA provenance job (
slsa-github-generatorwithupload-assets: true,upload-tag-name: nightly) creates a draft release on thenightlytag, andbuild-nightly-build'sgh release delete nightlyonly removes the published release — the draft sharing the tag is left behind, so a new draft piles up each cycle.Fix: before recreating the nightly pre-release, delete every release pointing at the
nightlytag (drafts included) by id, then drop the tag as before.Notes
mainso it can merge ahead of the next scheduled nightly (sibling to fix(ci): publish agama-inbound jar so the auth-server image can build #14228).Summary by CodeRabbit