Restrict release workflow to the main branch - #288
Conversation
|
👋 Hello @glenn-jocher, thank you for submitting a
For more guidance, please refer to our Contributing Guide. Don't hesitate to leave a comment if you have any questions. Thank you for contributing to Ultralytics! 🚀 |
UltralyticsAssistant
left a comment
There was a problem hiding this comment.
🔍 PR Review
Made with ❤️ by Ultralytics Actions
No issues found. The workflow condition change is minimal and correctly restricts the publishing check job to the ultralytics/inference repository on the main branch.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
🚀 Great to see this merged, @glenn-jocher!
This update strengthens our release planning by ensuring the publish workflow only runs from |
🛠️ Summary
Restricts the release workflow to the
mainbranch by addinggithub.ref == 'refs/heads/main'to thecheckjob condition.Previously a
workflow_dispatchrun from a feature branch could tag and create a release from a commit that never landed onmain(the checkout defaults to the dispatched ref). This guard closes that gap while leaving normal push-to-main and main dispatch behavior unchanged. Part of a cross-repo release-workflow hardening pass (see ultralytics/template#91).🧪 Testing
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Tightens the publish workflow so releases only run from the
mainbranch ofultralytics/inference🚀📊 Key Changes
publish.ymlworkflow condition.checkjob now runs only when:ultralytics/inferencerefs/heads/main🎯 Purpose & Impact
mainbranches 🛡️