ci: allow workflow_dispatch on the release workflow#222
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe release workflow adds a required ChangesRelease Version Input and Resolution
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/release.yml:
- Around line 48-54: The step "Resolve version" currently expands the workflow
template directly in the shell which risks template injection; instead move the
template expressions into the step's env block (e.g., set KOEL_VERSION: "${{
inputs.koel_version }}" and GITHUB_REF_NAME: "${{ github.ref_name }}"), then in
the run script reference those safe env vars and perform the fallback in-shell
using POSIX parameter expansion (use REF derived from KOEL_VERSION and
GITHUB_REF_NAME like REF="${KOEL_VERSION:-$GITHUB_REF_NAME}"), ensure you quote
variables when echoing outputs and write VERSION and TAG to GITHUB_OUTPUT using
the existing keys VERSION and TAG to preserve behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: f0b06695-b2fb-4b60-9f8f-57fabad522ab
📒 Files selected for processing (1)
.github/workflows/release.yml
Mirrors what koel/franken's release workflow already does: accept a
koel_versioninput viaworkflow_dispatchso a release build can be re-triggered against any Koel tag without pushing a fresh git tag.Why it matters: today, if the production image build fails (network blip, draft koel/koel release not yet published, etc.), the only recovery path is
gh run rerun <id>against the original failed run — which only works while the run is still in retention. After 90 days, the run vanishes and the only recourse is to push a phantom git tag.With this in place, recovery is
gh workflow run release.yml --repo koel/docker -f koel_version=vX.Y.Z.Implementation
workflow_dispatchwith a requiredkoel_versioninputResolve versionstep picksinputs.koel_versionwhen present, otherwisegithub.ref_name(preserves existing tag-push behavior exactly)build-args: KOEL_VERSION_REF=...is now passed through todocker build, so the workflow value wins over the Dockerfile'sARGdefault. For tag-push runs the two values are identical; for dispatch runs the Dockerfile's pinned version is overridden.Test plan
./release vX.Y.Zstill works as beforegh workflow run release.yml -f koel_version=v9.4.0re-builds v9.4.0 cleanlySummary by CodeRabbit