fix: skipped stable tag for pre-relrease#5570
Conversation
…me with special characters
WalkthroughThe pull request introduces enhancements to the GitHub Actions workflow in Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant GitHub Actions
participant Docker Registry
User->>GitHub Actions: Trigger build with arm64 input
GitHub Actions->>GitHub Actions: Set ARM64_BUILD based on input
GitHub Actions->>GitHub Actions: Sanitize TARGET_BRANCH to flat_branch_name
GitHub Actions->>Docker Registry: Build and tag Docker image with flat_branch_name
GitHub Actions->>Docker Registry: Push Docker image
Tip Review status commentThe review status is no longer posted as a separate comment when there are no actionable or nitpick comments. In such cases, the review status is included in the walkthrough comment. New review modelWe have updated our review workflow to use the Anthropic's Claude family of models. Please share any feedback in the discussion post on our Discord. New featuresWalkthrough comment now includes:
Notes:
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (1)
Additional context usedactionlint
Additional comments not posted (5)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 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
Outside diff range, codebase verification and nitpick comments (1)
.github/workflows/build-branch.yml (1)
Line range hint
45-56: LGTM, but address the shellcheck hints.The modifications to the control flow in the
set_env_variablesstep allow the workflow to adapt based on whether the ARM64 build is requested and the release status. This change enhances the flexibility and robustness of the build process.To address the shellcheck hints and improve the script's quality, apply the following changes:
- if [ "${{ env.TARGET_BRANCH }}" == "master" ] || [ "${{ env.ARM64_BUILD }}" == "true" ] || ([ "${{ github.event_name }}" == "release" ] && [ "${{ env.IS_PRERELEASE }}" != "true" ]); then + if [ "${{ env.TARGET_BRANCH }}" == "master" ] || [ "${{ env.ARM64_BUILD }}" == "true" ] || { [ "${{ github.event_name }}" == "release" ] && [ "${{ env.IS_PRERELEASE }}" != "true" ]; }; then - echo "BUILDX_DRIVER=cloud" >> $GITHUB_OUTPUT - echo "BUILDX_VERSION=lab:latest" >> $GITHUB_OUTPUT - echo "BUILDX_PLATFORMS=linux/amd64,linux/arm64" >> $GITHUB_OUTPUT - echo "BUILDX_ENDPOINT=makeplane/plane-dev" >> $GITHUB_OUTPUT + { + echo "BUILDX_DRIVER=cloud" + echo "BUILDX_VERSION=lab:latest" + echo "BUILDX_PLATFORMS=linux/amd64,linux/arm64" + echo "BUILDX_ENDPOINT=makeplane/plane-dev" + } >> $GITHUB_OUTPUT else - echo "BUILDX_DRIVER=docker-container" >> $GITHUB_OUTPUT - echo "BUILDX_VERSION=latest" >> $GITHUB_OUTPUT - echo "BUILDX_PLATFORMS=linux/amd64" >> $GITHUB_OUTPUT - echo "BUILDX_ENDPOINT=" >> $GITHUB_OUTPUT + { + echo "BUILDX_DRIVER=docker-container" + echo "BUILDX_VERSION=latest" + echo "BUILDX_PLATFORMS=linux/amd64" + echo "BUILDX_ENDPOINT=" + } >> $GITHUB_OUTPUT fiTools
actionlint
44-44: shellcheck reported issue in this script: SC2235:style:1:92: Use { ..; } instead of (..) to avoid subshell overhead
(shellcheck)
44-44: shellcheck reported issue in this script: SC2129:style:2:3: Consider using { cmd1; cmd2; } >> file instead of individual redirects
(shellcheck)
44-44: shellcheck reported issue in this script: SC2086:info:2:33: Double quote to prevent globbing and word splitting
(shellcheck)
44-44: shellcheck reported issue in this script: SC2086:info:3:39: Double quote to prevent globbing and word splitting
(shellcheck)
44-44: shellcheck reported issue in this script: SC2086:info:4:54: Double quote to prevent globbing and word splitting
(shellcheck)
44-44: shellcheck reported issue in this script: SC2086:info:5:49: Double quote to prevent globbing and word splitting
(shellcheck)
44-44: shellcheck reported issue in this script: SC2129:style:7:3: Consider using { cmd1; cmd2; } >> file instead of individual redirects
(shellcheck)
44-44: shellcheck reported issue in this script: SC2086:info:7:44: Double quote to prevent globbing and word splitting
(shellcheck)
44-44: shellcheck reported issue in this script: SC2086:info:8:35: Double quote to prevent globbing and word splitting
(shellcheck)
44-44: shellcheck reported issue in this script: SC2086:info:9:42: Double quote to prevent globbing and word splitting
(shellcheck)
44-44: shellcheck reported issue in this script: SC2086:info:10:30: Double quote to prevent globbing and word splitting
(shellcheck)
44-44: shellcheck reported issue in this script: SC2086:info:12:50: Double quote to prevent globbing and word splitting
(shellcheck)
44-44: shellcheck reported issue in this script: SC2086:info:14:48: Double quote to prevent globbing and word splitting
(shellcheck)
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- .github/workflows/build-branch.yml (16 hunks)
Additional context used
actionlint
.github/workflows/build-branch.yml
44-44: shellcheck reported issue in this script: SC2235:style:1:92: Use { ..; } instead of (..) to avoid subshell overhead
(shellcheck)
44-44: shellcheck reported issue in this script: SC2129:style:2:3: Consider using { cmd1; cmd2; } >> file instead of individual redirects
(shellcheck)
44-44: shellcheck reported issue in this script: SC2086:info:2:33: Double quote to prevent globbing and word splitting
(shellcheck)
44-44: shellcheck reported issue in this script: SC2086:info:3:39: Double quote to prevent globbing and word splitting
(shellcheck)
44-44: shellcheck reported issue in this script: SC2086:info:4:54: Double quote to prevent globbing and word splitting
(shellcheck)
44-44: shellcheck reported issue in this script: SC2086:info:5:49: Double quote to prevent globbing and word splitting
(shellcheck)
44-44: shellcheck reported issue in this script: SC2129:style:7:3: Consider using { cmd1; cmd2; } >> file instead of individual redirects
(shellcheck)
44-44: shellcheck reported issue in this script: SC2086:info:7:44: Double quote to prevent globbing and word splitting
(shellcheck)
44-44: shellcheck reported issue in this script: SC2086:info:8:35: Double quote to prevent globbing and word splitting
(shellcheck)
44-44: shellcheck reported issue in this script: SC2086:info:9:42: Double quote to prevent globbing and word splitting
(shellcheck)
44-44: shellcheck reported issue in this script: SC2086:info:10:30: Double quote to prevent globbing and word splitting
(shellcheck)
44-44: shellcheck reported issue in this script: SC2086:info:12:50: Double quote to prevent globbing and word splitting
(shellcheck)
44-44: shellcheck reported issue in this script: SC2086:info:14:48: Double quote to prevent globbing and word splitting
(shellcheck)
Additional comments not posted (5)
.github/workflows/build-branch.yml (5)
5-10: LGTM!The addition of the
arm64input parameter to theworkflow_dispatchevent enhances the flexibility of the workflow by allowing users to specify whether to build for the ARM64 architecture when manually triggering the workflow.
20-21: LGTM!The addition of the
ARM64_BUILDandIS_PRERELEASEenvironment variables enhances the workflow's adaptability and control over the build process.
- Setting the
ARM64_BUILDenvironment variable based on thearm64input allows the workflow to adapt based on whether the ARM64 build is requested.- Setting the
IS_PRERELEASEenvironment variable based on theprereleaseproperty of the release event allows the workflow to determine if the release is a pre-release.
39-39: LGTM!The introduction of the
flat_branch_nameoutput variable in thebranch_build_setupjob ensures that the Docker image tags are consistent and correctly formatted by sanitizing the branch name. This change enhances the clarity and reliability of the tags.Also applies to: 57-58
108-108: LGTM!The changes in the Docker tag setting steps for each job enhance the clarity, reliability, and control over versioning and tagging of Docker images.
- Using
flat_branch_nameinstead ofgh_branch_namefor Docker image tagging enhances the clarity and reliability of the tags.- Refining the logic for setting Docker tags in the release event to include a check for the
IS_PRERELEASEvariable ensures that stable tags are only added when appropriate. This change enhances the control over versioning and tagging of Docker images based on the release status.Also applies to: 118-121, 164-164, 174-177, 220-220, 230-233, 276-276, 286-289, 332-332, 342-345, 388-388, 398-401
Line range hint
1-438: Overall, the changes look good to me!The changes proposed in this pull request focus on improving the tagging strategy for both releases and Docker images within the project. The modifications enhance the flexibility, robustness, clarity, and control over the build process and versioning of Docker images.
Great job on the improvements! Let me know if you have any further questions or concerns.
Tools
actionlint
44-44: shellcheck reported issue in this script: SC2235:style:1:92: Use { ..; } instead of (..) to avoid subshell overhead
(shellcheck)
44-44: shellcheck reported issue in this script: SC2129:style:2:3: Consider using { cmd1; cmd2; } >> file instead of individual redirects
(shellcheck)
44-44: shellcheck reported issue in this script: SC2086:info:2:33: Double quote to prevent globbing and word splitting
(shellcheck)
44-44: shellcheck reported issue in this script: SC2086:info:3:39: Double quote to prevent globbing and word splitting
(shellcheck)
44-44: shellcheck reported issue in this script: SC2086:info:4:54: Double quote to prevent globbing and word splitting
(shellcheck)
44-44: shellcheck reported issue in this script: SC2086:info:5:49: Double quote to prevent globbing and word splitting
(shellcheck)
44-44: shellcheck reported issue in this script: SC2129:style:7:3: Consider using { cmd1; cmd2; } >> file instead of individual redirects
(shellcheck)
44-44: shellcheck reported issue in this script: SC2086:info:7:44: Double quote to prevent globbing and word splitting
(shellcheck)
44-44: shellcheck reported issue in this script: SC2086:info:8:35: Double quote to prevent globbing and word splitting
(shellcheck)
44-44: shellcheck reported issue in this script: SC2086:info:9:42: Double quote to prevent globbing and word splitting
(shellcheck)
44-44: shellcheck reported issue in this script: SC2086:info:10:30: Double quote to prevent globbing and word splitting
(shellcheck)
44-44: shellcheck reported issue in this script: SC2086:info:12:50: Double quote to prevent globbing and word splitting
(shellcheck)
44-44: shellcheck reported issue in this script: SC2086:info:14:48: Double quote to prevent globbing and word splitting
(shellcheck)
stabletag for pre-releasesfix/branch-build-actionwill create a docker tag asfix-branch-build-actionSummary by CodeRabbit
New Features
Improvements