-
Notifications
You must be signed in to change notification settings - Fork 18
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: multi-platform docker build #85
Conversation
WalkthroughThe pull request updates the GitHub Actions workflow for Docker. It upgrades several action versions, including checkout, login, metadata, and build-push actions. Additionally, new steps are introduced to set up QEMU and Docker Buildx. The changes also add new parameters for specifying platforms and caching in the build-push action. Changes
Sequence Diagram(s)sequenceDiagram
participant Runner as GitHub Actions Runner
participant Checkout as actions/checkout@v4
participant Login as docker/login-action@v3
participant QEMU as docker/setup-qemu-action@v3
participant Buildx as docker/setup-buildx-action@v3
participant Metadata as docker/metadata-action@v5
participant BuildPush as docker/build-push-action@v5
Runner->>Checkout: Checkout code
Runner->>Login: Perform Docker login
Runner->>QEMU: Setup QEMU
Runner->>Buildx: Setup Buildx
Runner->>Metadata: Generate metadata
Runner->>BuildPush: Build and push image
Poem
🪧 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.
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/docker.yml (1)
27-29
: Nitpick on Job Identifier Naming.
The job ID and name are defined as "minitiad", yet the image name is "minimove". Consider verifying that this naming is intentional and consistent across your CI/CD configuration to avoid confusion.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/docker.yml
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Analyze (go)
🔇 Additional comments (6)
.github/workflows/docker.yml (6)
36-36
: Upgrade actions/checkout to v4.
The checkout step now uses actions/checkout@v4, which should include performance improvements and enhanced features over v3. Ensure that no breaking changes affect subsequent steps.
39-39
: Update docker/login-action to v3.
The login action has been updated to v3 for improved authentication handling. Please verify that the registry login still works as expected with this version upgrade.
45-47
: Add QEMU Setup Step.
A new step using docker/setup-qemu-action@v3 has been added for emulating different CPU architectures, which is necessary for multi-platform builds. This addition looks correct; ensure that QEMU is properly configured on the runner.
48-50
: Introduce Docker Buildx Setup.
The workflow now includes a step to set up Docker Buildx (using docker/setup-buildx-action@v3), enabling multi-platform builds. Confirm that Buildx is correctly initialized and integrates with your build process.
53-56
: Upgrade Metadata Action to v5.
The metadata extraction step has been upgraded to docker/metadata-action@v5. Verify that the image tags and labels produced align with your downstream usage in the build and push steps.
58-67
: Enhance Docker Build-Push Configuration.
The build and push step now uses docker/build-push-action@v5 with several improvements:
- The platforms parameter is set to "linux/amd64,linux/arm64" for multi-platform support.
- The push parameter conditionally pushes only when the ref is a tag.
- Caching is enabled via cache-from and cache-to using GitHub Actions internal caching (type=gha) to speed up builds.
Ensure these parameters meet your CI strategy and that the caching behavior is as intended.
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.
LGTM
Description
Closes: #XXXX
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
in the type prefix if API or client breaking changeReviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
Summary by CodeRabbit