-
Notifications
You must be signed in to change notification settings - Fork 2
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
ci: add build-arm64 and build-initializer option for dev-build workflow #220
Conversation
WalkthroughThe pull request introduces an update to the GitHub Actions workflow configuration in Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant GitHub Actions
participant Docker
User->>GitHub Actions: Trigger build with build-arm64 and build-initializer
GitHub Actions->>GitHub Actions: Check build-arm64 value
alt build-arm64 is true
GitHub Actions->>Docker: Set platforms to linux/amd64, linux/arm64
else build-arm64 is false
GitHub Actions->>Docker: Set platforms to linux/amd64
end
GitHub Actions->>GitHub Actions: Check build-initializer value
alt build-initializer is true
GitHub Actions->>Docker: Start initializer build
end
GitHub Actions->>Docker: Start build with selected platforms
Poem
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
Documentation and Community
|
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
🧹 Outside diff range and nitpick comments (2)
.github/workflows/dev-build.yaml (2)
93-100
: Add quotes around shell variables for better safetyThe platform determination logic is good, but the shell script could be made more robust by quoting variables.
- PLATFORMS="linux/amd64" - if ${{ inputs.build-arm64 }}; then - PLATFORMS="linux/amd64,linux/arm64" - fi - echo "PLATFORMS=${PLATFORMS}" >> $GITHUB_ENV + PLATFORMS="linux/amd64" + if ${{ inputs.build-arm64 }}; then + PLATFORMS="linux/amd64,linux/arm64" + fi + echo "PLATFORMS=${PLATFORMS}" >> "${GITHUB_ENV}"🧰 Tools
🪛 actionlint
95-95: shellcheck reported issue in this script: SC2086:info:5:34: Double quote to prevent globbing and word splitting
(shellcheck)
Line range hint
27-107
: Good architectural decision for build optimizationMaking ARM64 builds optional is a good architectural decision because it:
- Optimizes CI/CD pipeline performance by default (AMD64 only)
- Maintains flexibility to build ARM64 when needed
- Keeps the initializer's multi-arch support unchanged
Consider documenting these build options in the project's developer documentation.
🧰 Tools
🪛 actionlint
95-95: shellcheck reported issue in this script: SC2086:info:5:34: Double quote to prevent globbing and word splitting
(shellcheck)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (1)
.github/workflows/dev-build.yaml
(2 hunks)
🧰 Additional context used
🪛 actionlint
.github/workflows/dev-build.yaml
95-95: shellcheck reported issue in this script: SC2086:info:5:34: Double quote to prevent globbing and word splitting
(shellcheck)
🔇 Additional comments (2)
.github/workflows/dev-build.yaml (2)
27-31
: LGTM! Well-structured input parameter definition
The new build-arm64
parameter is well-defined with clear documentation explaining its purpose and performance implications.
107-107
: Verify build matrix coverage requirements
The operator build now uses dynamic platform selection while the initializer continues to build for both platforms. Please confirm this is the intended behavior and that all required platform combinations are covered by the test matrix.
552c50b
to
9962f38
Compare
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: 1
🧹 Outside diff range and nitpick comments (1)
.github/workflows/dev-build.yaml (1)
Line range hint
27-128
: Consider adding workflow documentationThe ARM64 build support is well-implemented, but consider adding a comment block at the top of the workflow explaining:
- When to use the ARM64 build option
- The relationship between operator and initializer builds
- Performance implications of multi-architecture builds
This will help future maintainers understand the workflow's capabilities and trade-offs.
🧰 Tools
🪛 actionlint
100-100: shellcheck reported issue in this script: SC2086:info:5:34: Double quote to prevent globbing and word splitting
(shellcheck)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (1)
.github/workflows/dev-build.yaml
(3 hunks)
🧰 Additional context used
🪛 actionlint
.github/workflows/dev-build.yaml
100-100: shellcheck reported issue in this script: SC2086:info:5:34: Double quote to prevent globbing and word splitting
(shellcheck)
🔇 Additional comments (3)
.github/workflows/dev-build.yaml (3)
27-36
: LGTM! Well-structured input parameters
The new input parameters are well-defined with appropriate types, descriptions, and default values that maintain backward compatibility.
112-112
: LGTM! Proper integration with dynamic platform selection
The operator build step correctly uses the dynamically determined platforms.
123-128
: LGTM! Verify initializer build requirements
The conditional build and platform configuration are correctly implemented. However, please verify if there are any scenarios where the initializer must be built together with the operator to maintain system consistency.
Summary by CodeRabbit
build-arm64
for the Dev Build workflow, allowing users to specify ARM64 image builds.build-initializer
to control the execution of the initializer build step.build-arm64
parameter.