Refactor job summary generation in Docker publish workflow#196
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe pull request refactors the Docker publish workflow to use GitHub Actions step outputs for passing the Docker tag summary between steps, replacing the previous environment variable approach with a heredoc-based output declaration and consolidated summary generation logic. ChangesJob Summary Output Refactoring
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
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 |
Up to standards ✅🟢 Issues
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/publish-docker.yml:
- Line 109: The line assigning const summary = `${{
steps.job-summary.outputs.summary }}` will break JS when the output contains
newlines or backticks; change the step to pass the job-summary output via an
environment variable (e.g., set env: SUMMARY: ${{
steps.job-summary.outputs.summary }}) and read process.env.SUMMARY (or use the
shell to safely read "$SUMMARY") in the run step instead of direct
interpolation, ensuring the multiline/markdown content is not injected into the
JS source; update references to the summary variable (const summary) to use the
env value.
- Line 97: The printf invocation building SUMMARY currently uses an unquoted
${DOCKER_METADATA_OUTPUT_TAGS} which can break on whitespace/special chars;
update the SUMMARY assignment to use a single printf format string and pass
"$DOCKER_METADATA_OUTPUT_TAGS" as a quoted argument (i.e., keep the format with
"## Docker tags\n\`\`\`\n%s\n\`\`\`\n" and supply
"$DOCKER_METADATA_OUTPUT_TAGS") so the variable is preserved as one argument and
word-splitting is avoided.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 9c4a8e23-4d2f-4b0e-bf73-21bfcd9e0b6b
📒 Files selected for processing (1)
.github/workflows/publish-docker.yml
Summary by CodeRabbit