Skip to content

Switch API Docker pipeline to single-arch builds + manifest merge#49

Merged
benjamin-747 merged 2 commits into
gitmono-dev:mainfrom
WiedersehenM:chore/ci-single-arch-build-manifest
Jan 27, 2026
Merged

Switch API Docker pipeline to single-arch builds + manifest merge#49
benjamin-747 merged 2 commits into
gitmono-dev:mainfrom
WiedersehenM:chore/ci-single-arch-build-manifest

Conversation

@WiedersehenM

Copy link
Copy Markdown
Contributor

Changed

  • Local build script
    script/demo/build-images-arm64-local.sh
    • Detects host CPU (amd64 / arm64)
    • Builds one architecture at a time, optional --push
    • Tags as <IMAGE_TAG>-<arch>

  • Script README
    Usage, prerequisites and examples in script/demo/README.md.

  • CI workflow refactor (.github/workflows/deploy-api.yml)

    1. build-push-single-arch – matrix builds amd64 & arm64, pushes single-arch images
    2. manifest – combines the two into a multi-arch manifest list
    3. deploy – forces redeploy on both ECS services (staging & prod) with the manifest tag
    4. Uses fixed IMAGE_TAG_BASE (campsite-0.1.0-pre-release), no commit SHA appended.

Motivation

  • Parity with Mega repo – adopt the same “build once, deploy twice” pattern.
  • Smaller registry clutter – single-arch layers; manifest created only when necessary.

Notes

  • No breaking changes to runtime code.
  • Future releases only need to adjust IMAGE_TAG_BASE or build args in one place.

• Add auto-arch local build script (script/demo)
• Unify tag scheme: <base>-amd64 / -arm64

Signed-off-by: Hongze Gao <15101764808@163.com>
Comment thread .github/workflows/deploy-api.yml Outdated
service: campsite-api-staging-service-njx3hjyx
- cluster: gitmono-com-mega-app
service: campsite-api-service
platform: [linux/amd64, linux/arm64]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

action 不需要构建linux/arm64

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已更正

- Refactor deploy-api workflow to build/push amd64 only
- Create manifest list from CI amd64 + locally pushed arm64, then deploy to 2 ECS services
- Update local build script to always --load and use docker push (avoid OCI index on buildx --push)

Signed-off-by: Hongze Gao <15101764808@163.com>
@WiedersehenM

Copy link
Copy Markdown
Contributor Author

脚本调整

固定使用 --load 构建

  • docker buildx build 统一加 --load,先把镜像加载到本地 Docker Daemon。
  • 彻底避免 container-driver 在 --push 情况下自动封装 OCI index 的问题,确保输出为单架构镜像 manifest

@benjamin-747 benjamin-747 added this pull request to the merge queue Jan 27, 2026
Merged via the queue into gitmono-dev:main with commit f50f26a Jan 27, 2026
4 checks passed
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.

2 participants