Skip to content

feat: Add amd/arm64 for the docker image artifacts#84

Open
sqaisar wants to merge 1 commit intowandb:mainfrom
sqaisar:feat/multiarch-image
Open

feat: Add amd/arm64 for the docker image artifacts#84
sqaisar wants to merge 1 commit intowandb:mainfrom
sqaisar:feat/multiarch-image

Conversation

@sqaisar
Copy link

@sqaisar sqaisar commented Apr 11, 2025

Summary by CodeRabbit

  • New Features

    • Enabled multi-architecture support for container images, ensuring compatibility with various system environments.
  • Chores

    • Streamlined the build and deployment process to improve efficiency and reliability during releases.
    • Updated the build process to dynamically adapt to different target architectures and operating systems.

@coderabbitai
Copy link

coderabbitai bot commented Apr 11, 2025

Walkthrough

This pull request updates the GitHub release workflow and the Dockerfile. The workflow now utilizes the docker/build-push-action@v4 to build and push multi-architecture Docker images (targeting both linux/amd64 and linux/arm64), with updated repository and tagging conventions. Additionally, the Dockerfile’s build commands have been adjusted to use dynamic environment variables (${TARGETARCH} and ${TARGETOS}) instead of hardcoded values, thereby enabling flexible cross-platform builds.

Changes

File(s) Change Summary
.github/.../release.yaml Replaced custom "Build and Push" step with "Build and Push Multi-arch Images" using docker/build-push-action@v4. Updated tags and repository name.
Dockerfile Changed hardcoded GOARCH=amd64 and GOOS=linux to dynamic values (${TARGETARCH} and ${TARGETOS}) for flexible cross-platform builds.

Sequence Diagram(s)

sequenceDiagram
    actor Developer
    participant Workflow as GH Workflow
    participant BuildAction as Docker Build-Push Action
    participant Registry as Docker Registry

    Developer->>Workflow: Trigger release workflow
    Workflow->>BuildAction: Execute multi-arch build step
    BuildAction->>Registry: Push built images (linux/amd64, linux/arm64)
    Registry-->>BuildAction: Confirm image push
    BuildAction-->>Workflow: Return success result
Loading

Poem

I hop with joy in code’s bright light,
Building images both day and night.
Multi-arch magic in every line,
Dynamic builds so smooth and fine.
A rabbit’s cheer for changes divine! 🐇✨

Tip

⚡💬 Agentic Chat (Pro Plan, General Availability)
  • We're introducing multi-step agentic chat in review comments and issue comments, within and outside of PR's. This feature enhances review and issue discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments and add commits to existing pull requests.

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@sqaisar sqaisar changed the title Adding amd/arm64 for the docker image artifacts feat add amd/arm64 for the docker image artifacts Apr 11, 2025
Copy link

@coderabbitai coderabbitai bot left a 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.yaml (1)

53-53: Action Version Update Notice

Static analysis has flagged that the current reference to docker/build-push-action@v4 might be using an outdated runner. Please consider updating this to the latest stable patch version (for example, docker/build-push-action@v4.x) to ensure full compatibility with GitHub Actions runners.

🧰 Tools
🪛 actionlint (1.7.4)

53-53: the runner of "docker/build-push-action@v4" 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

📥 Commits

Reviewing files that changed from the base of the PR and between f595930 and 7a24959.

📒 Files selected for processing (2)
  • .github/workflows/release.yaml (1 hunks)
  • Dockerfile (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/release.yaml

53-53: the runner of "docker/build-push-action@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🔇 Additional comments (2)
Dockerfile (1)

28-28: Dynamic Build Command Usage

The build command now uses GOOS=${TARGETOS} and GOARCH=${TARGETARCH} instead of hardcoded values. This update ensures the binary is built for the appropriate target platform, supporting multi-architecture builds as intended by the PR objectives.

.github/workflows/release.yaml (1)

52-63: Multi-Arch Image Build & Tag Configuration

The new "Build and Push Multi-arch Images" step leverages the docker/build-push-action@v4 action to build images for both linux/amd64 and linux/arm64. The dynamic tagging using release outputs is cleanly integrated and aligns with the PR objectives for supporting multiple architectures and repository updates.

🧰 Tools
🪛 actionlint (1.7.4)

53-53: the runner of "docker/build-push-action@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

@sqaisar sqaisar changed the title feat add amd/arm64 for the docker image artifacts feat: add amd/arm64 for the docker image artifacts Apr 11, 2025
@sqaisar sqaisar changed the title feat: add amd/arm64 for the docker image artifacts feat: Add amd/arm64 for the docker image artifacts Apr 11, 2025
@sqaisar sqaisar force-pushed the feat/multiarch-image branch from 7a24959 to b570145 Compare April 11, 2025 09:42
Copy link

@coderabbitai coderabbitai bot left a 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.yaml (1)

52-53: Update Docker Build-Push Action Version

The "Build and Push Multi-arch Images" step currently uses docker/build-push-action@v4, but static analysis indicates that this version may be outdated for the current GitHub Actions environment. Consider upgrading to a newer version (for example, docker/build-push-action@v5) to leverage the latest features and improvements.

-        uses: docker/build-push-action@v4
+        uses: docker/build-push-action@v5
🧰 Tools
🪛 actionlint (1.7.4)

53-53: the runner of "docker/build-push-action@v4" 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

📥 Commits

Reviewing files that changed from the base of the PR and between 7a24959 and b570145.

📒 Files selected for processing (2)
  • .github/workflows/release.yaml (1 hunks)
  • Dockerfile (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • Dockerfile
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/release.yaml

53-53: the runner of "docker/build-push-action@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🔇 Additional comments (1)
.github/workflows/release.yaml (1)

54-63: Verify Multi-Arch Build Configuration and Tagging

The multi-architecture build configuration is well structured—with the build context set to the repository root, pushing enabled, and target platforms specified as linux/amd64,linux/arm64. The dynamic tag expressions (using release output values) are also aligned with the updated versioning scheme. Please ensure that the preceding release step properly generates the expected output values so that the tagging behaves as intended.

@sqaisar
Copy link
Author

sqaisar commented Apr 11, 2025

@danielpanzella

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant