-
Notifications
You must be signed in to change notification settings - Fork 203
chore: Improved release pipeline #724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe PR consolidates Docker image publishing functionality by removing the dedicated Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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 |
This comment was marked as off-topic.
This comment was marked as off-topic.
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/release-sourcebot.yml (1)
368-375: Consider removing unnecessarypackages: writepermission.The cleanup job only deletes a Git branch; it doesn't interact with packages. The
packages: writepermission appears unnecessary and could be removed to follow the principle of least privilege.Suggested fix
cleanup: needs: [prepare-release, build, finalize-release, update-helm-chart] if: always() && needs.prepare-release.outputs.temp_branch != '' runs-on: ubuntu-latest permissions: contents: write - packages: write
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/ghcr-publish.yml.github/workflows/release-sourcebot.yml
💤 Files with no reviewable changes (1)
- .github/workflows/ghcr-publish.yml
🧰 Additional context used
🪛 GitHub Check: CodeQL
.github/workflows/release-sourcebot.yml
[warning] 365-368: Workflow does not contain permissions
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {{}}
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Cursor Bugbot
- GitHub Check: build
🔇 Additional comments (9)
.github/workflows/release-sourcebot.yml (9)
15-21: LGTM!The workflow-level configuration is well-structured. The concurrency group with
cancel-in-progress: falseis appropriate for release workflows to prevent accidental cancellation of in-progress releases.
47-91: LGTM!The version calculation logic is correct. The version is properly extracted from CHANGELOG.md using grep, parsed into components, bumped according to the input type, and exported to both
GITHUB_ENV(for subsequent steps) andGITHUB_OUTPUT(for dependent jobs).
134-142: Good approach using a temporary branch for atomic releases.Pushing to a temporary branch before building ensures the release commit is stable during the build process, and allows for rollback if the build fails without polluting the main branch.
144-161: LGTM!The matrix strategy correctly maps platforms to appropriate runners (ubuntu-latest for amd64, ubuntu-24.04-arm for arm64), enabling native builds for each architecture.
242-249: LGTM!The cosign signing configuration is correctly set up. Using the OIDC identity token with Fulcio for keyless signing is the recommended approach for GitHub Actions.
277-301: LGTM!The fast-forward merge logic is correctly implemented. The check
git merge-base --is-ancestor main "$TEMP_BRANCH"correctly validates that main can be fast-forwarded to the release branch, and the error message helpfully shows which commits caused the conflict.
344-352: LGTM!The manifest list creation correctly combines the platform-specific digests into a multi-architecture manifest and applies the version and latest tags.
390-400: LGTM!Good defensive coding—checking if the branch exists before attempting deletion prevents errors when the branch was already cleaned up or never created.
364-366: Permissions block is not required for this job.This job calls a reusable external workflow that supports
workflow_call. The external workflow (update-sourcebot-version.yaml) does not accept any inputs and automatically determines the Sourcebot version by querying the latest GitHub release via API. It also defines its own permissions (contents: write, pull-requests: write) which are sufficient for its operations.No action needed—the job is correctly configured.
…in permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is being reviewed by Cursor Bugbot
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| contents: read | ||
| packages: write | ||
| id-token: write | ||
| uses: sourcebot-dev/sourcebot-helm-chart/.github/workflows/update-sourcebot-version.yaml@main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Helm chart workflow missing version input parameter
High Severity
The update-helm-chart job calls the external workflow update-sourcebot-version.yaml without passing the version as an input. Additionally, the job only declares needs: finalize-release, so it cannot access needs.prepare-release.outputs.version since GitHub Actions only allows accessing outputs from directly declared dependencies. The helm chart update workflow likely requires the version to know what Sourcebot version to configure, but currently receives no version information.
This PR improves the automated release pipeline in a few ways:
SOU-178
Note
Makes the release process atomic and self-contained within
release-sourcebot.yml, replacing the separateghcr-publish.ymlworkflow.CHANGELOG.mdandversion.ts, push a temprelease-vX.Y.Zbranch), build (Buildx multi-arch, cache, sign with cosign, upload digests, tagvX.Y.Zandlatest), finalize-release (fast-forwardmainto temp branch, create annotated tag, push, assemble and push manifest list from digests, verify via inspect, then create GitHub release), update-helm-chart (trigger external workflow), and cleanup (delete temp branch).REGISTRY_IMAGEenv; integrates image publishing/signing and manifest creation directly into the release workflow..github/workflows/ghcr-publish.yml.Written by Cursor Bugbot for commit 8b63889. This will update automatically on new commits. Configure here.