chore: add github action to raise release RC PR#1429
Conversation
WalkthroughA new GitHub Actions workflow file, Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant GH as GitHub Actions
participant R as Repository
participant V as Version Files
participant PR as Pull Request
U->>GH: Trigger workflow_dispatch with version inputs
GH->>R: Checkout repository
GH->>R: Set up Git identity
GH->>R: Create new branch based on release version
GH->>V: Update version variables in docker.go and .env.example
GH->>R: Commit and push changes
GH->>PR: Create pull request targeting main branch
Possibly related PRs
Suggested reviewers
Poem
Tip ⚡🧪 Multi-step agentic review comment chat (experimental)
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
.github/workflows/release-rc-pr.yaml (3)
23-25: Checkout Action Version Update:
The checkout step usesactions/checkout@v3. However, static analysis hints recommend updating this action to a more recent version as the runner might be considered outdated. Consider upgrading to a later stable version (e.g.,actions/checkout@v4) to benefit from the latest improvements.Proposed diff:
- uses: actions/checkout@v3 + uses: actions/checkout@v4🧰 Tools
🪛 actionlint (1.7.4)
24-24: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
37-46: Updatingdocker.go:
The sed command attempts to replace theWREN_PRODUCT_VERSIONstring with the new release version. The regex pattern appears well-crafted for a typical Go file declaration. A minor suggestion: confirm that the file formatting (e.g., use of tab characters) matches the assumptions in the sed command so the substitution is robust against formatting variations.
70-79: Pull Request Creation & Action Version Update:
The workflow usespeter-evans/create-pull-request@v5to automatically create a PR. Similar to the checkout step, static analysis hints indicate that this action's version may be outdated. It is advisable to update to a newer version (e.g.,peter-evans/create-pull-request@v6) to ensure compatibility and take advantage of recent updates.Proposed diff:
- uses: peter-evans/create-pull-request@v5 + uses: peter-evans/create-pull-request@v6The inputs provided to the action (token, commit message, branch, base, title, body, and draft flag) are clear and consistent with the PR objectives.
🧰 Tools
🪛 actionlint (1.7.4)
71-71: the runner of "peter-evans/create-pull-request@v5" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/release-rc-pr.yaml(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/release-rc-pr.yaml
24-24: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
71-71: the runner of "peter-evans/create-pull-request@v5" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🔇 Additional comments (8)
.github/workflows/release-rc-pr.yaml (8)
1-2: Workflow Name & File Overview:
The workflow name "Create Release RC" clearly describes the purpose of the automation. The file is structured well as a GitHub Actions YAML and follows the expected conventions for defining manual triggers viaworkflow_dispatch.
3-17: Input Definitions Clarity:
The inputs forrelease_version,ui_version,ai_version, andengine_versionare clearly defined with descriptive messages and marked as required. This makes the workflow self-documenting and easy to use.
19-22: Job & Runner Configuration:
The jobcreate-release-pris set to run onubuntu-latest, which is standard and appropriate for this kind of automation.
26-30: Git Identity Setup:
The Git identity is configured correctly with a bot username (wren-ai[bot]) and a designated email. This ensures that automated commits are properly attributed.
31-36: Branch Creation Step:
The branch creation script constructs a branch name using the providedrelease_versioninput, checks out the new branch, and exports it via theGITHUB_ENV. This approach is clear and effective.
47-60: Updating.env.example:
The workflow updates multiple environment variables using sed. Each substitution cleanly replaces the entire line for the respective version variables. The subsequent grep helps verify the changes. Ensure that the patterns in the.env.examplefile consistently match these regex substitutions.
61-65: Committing Changes:
The commit step stages the two modified files and creates a commit with a clear message that includes the release version. This is a straightforward and effective commit operation.
66-69: Pushing the Branch:
Pushing the branch using the environment variable set in the previous steps is correctly implemented. The use of--set-upstreamensures that tracking is properly established.
add github action to raise release RC PR
update WREN_PRODUCT_VERSION with release_version
update WREN_ENGINE_VERSION and IBIS_SERVER_VERSION with engine_version
update WREN_AI_SERVICE_VERSION with ai_version
update WREN_UI_VERSION with ui_version
Summary by CodeRabbit