Conversation
📝 WalkthroughWalkthroughThe release workflow file was modified to upgrade the Docker build action from v5 to v6 and add a step that automatically updates README.md with the new Docker image digest following a successful release, with changes committed and pushed if modifications occur. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the 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.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/release.yml (1)
65-65:⚠️ Potential issue | 🟡 MinorPre-existing bug: wrong step reference.
steps.semantic-dry-run.outputsshould besteps.semantic.outputs(the step id on Line 18 issemantic). Not introduced by this PR, but currently this always dumps an empty/null value.
🧹 Nitpick comments (1)
.github/workflows/release.yml (1)
105-126: Pushing tomainwill re-trigger this workflow.The
docs:commit pushed tomainon Line 125 will trigger another run of this workflow (per theon: push: branches: maintrigger). That run will be a no-op since semantic-release won't find releasable commits, but it's wasteful. Consider adding[skip ci]to the commit message.Also, as a minor hardening measure, prefer passing the digest via an
env:block rather than interpolating${{ steps.docker_build.outputs.digest }}directly in the shell script. While the digest output is a safe sha256 hash, avoiding direct expression interpolation inrun:is a good habit to prevent script injection in other contexts.♻️ Suggested changes
- name: Update README with new docker digest if: steps.semantic.outputs.new-release-published == 'true' + env: + DIGEST: ${{ steps.docker_build.outputs.digest }} run: | - # Extract just the sha256 hash from the digest - DIGEST="${{ steps.docker_build.outputs.digest }}" - # Update both occurrences of the digest in README.md sed -i.bak "s|ghcr.io/codfish/semantic-release-action@sha256:[a-f0-9]*|ghcr.io/codfish/semantic-release-action@${DIGEST}|g" README.md rm README.md.bak # Commit and push if there are changes git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" git add README.md # Only commit if there are actual changes if git diff --staged --quiet; then echo "No changes to README.md" else - git commit -m "docs: update docker digest to ${DIGEST}" + git commit -m "docs: update docker digest to ${DIGEST} [skip ci]" git push origin main fi
Uh oh!
There was an error while loading. Please reload this page.