Skip to content

Conversation

@seefs001
Copy link
Collaborator

@seefs001 seefs001 commented Oct 11, 2025

Summary by CodeRabbit

  • New Features

    • Docker images are now published for multiple architectures (amd64 and arm64).
    • Multi-arch manifests ensure docker pull automatically selects the right image.
    • Expanded tagging: alpha and versioned tags available on both Docker Hub and GHCR.
  • Chores

    • Streamlined build and publish pipeline with native per-arch builds and manifest creation.
    • Improved version detection and repository handling for consistent tagging.
    • Enabled caching to speed up image builds and releases.

kyubibii and others added 14 commits October 2, 2025 12:25
- What: 在充值卡显示的实付与节省金额前加入美元符号 `$`。
- Why: 满足 issue #1881,要求在金额前标注货币单位以减少歧义。
- Files: src/components/topup/RechargeCard.jsx
- Note: 这是局部修复。建议后续实现统一的 currency formatter(Intl.NumberFormat)并从后端/配置读取货币代码以支持本地化与多币种。

Closes #1881
fix(topup): add currency symbol to amounts in RechargeCard
Revert "fix(topup): add currency symbol to amounts in RechargeCard"
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 11, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The workflow now builds single-architecture images for amd64 and arm64 via a matrix, pushes per-arch tags to Docker Hub and GHCR, then assembles and pushes multi-arch manifests. The Dockerfile adds TARGETOS/TARGETARCH args and explicit GOOS/GOARCH, with GO modules enabled and CGO disabled for multi-arch builds.

Changes

Cohort / File(s) Summary of Changes
CI/CD workflow: multi-arch build and manifests
.github/workflows/docker-image-alpha.yml
Replaces push_to_registries with matrix-based build_single_arch (amd64, arm64) on explicit runners; adds GHCR repo normalization; shallow checkout; explicit Buildx setup; logins to GHCR and Docker Hub; revised metadata targeting GHCR; single-arch build-and-push with expanded tags and cache; adds create_manifests job to assemble/push multi-arch manifests for alpha and versioned tags to both registries; exposes VERSION output.
Dockerfile: arch-aware build settings
Dockerfile
Adds ARGs TARGETOS/TARGETARCH; sets ENV GOOS/GOARCH (defaults linux/amd64); explicitly sets GO111MODULE=on and CGO_ENABLED=0; restructures env configuration to support native multi-arch builds without altering runtime commands.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    actor Dev as Commit/Tag
    participant GH as GitHub Actions
    participant R1 as Runner (amd64)
    participant R2 as Runner (arm64)
    participant BX as Docker Buildx
    participant DH as Docker Hub
    participant GHCR as GHCR

    Dev->>GH: Trigger workflow (alpha)
    GH->>R1: Job build_single_arch (matrix: amd64)
    GH->>R2: Job build_single_arch (matrix: arm64)

    par Per-arch build and push
        R1->>BX: Build image (linux/amd64) with cache
        R1->>DH: Push per-arch tags
        R1->>GHCR: Push per-arch tags
        R2->>BX: Build image (linux/arm64) with cache
        R2->>DH: Push per-arch tags
        R2->>GHCR: Push per-arch tags
    end

    GH->>GH: Start create_manifests (needs build_single_arch)
    GH->>DH: Create/push multi-arch manifests (alpha, versioned)
    GH->>GHCR: Create/push multi-arch manifests (alpha, versioned)

    note over GH,DH: Manifests reference per-arch images
    note over GH,GHCR: Version and alpha tags published
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

I hopped through arches, two by two,
amd and arm, a carrot brew. 🥕
I stitched their layers, tag by tag,
then raised a manifest-like flag.
With modules on and CGO nil,
I ship my burrow’s nightly build—thrill!
To GHCR and Hub I fill.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch alpha

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0ff98b1 and 2842ae5.

📒 Files selected for processing (2)
  • .github/workflows/docker-image-alpha.yml (1 hunks)
  • Dockerfile (1 hunks)

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Calcium-Ion Calcium-Ion merged commit 6592098 into main Oct 11, 2025
3 of 4 checks passed
Sacode pushed a commit to Sacode/new-api that referenced this pull request Oct 11, 2025
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.

4 participants