Files
xiaohongshu-mcp/.github/workflows/docker-release.yml
zy 19471706ad feat: 添加 ARM64 架构的 Docker 镜像支持 (#282)
新增 Dockerfile.arm64 用于构建 ARM64 架构镜像,与现有 amd64 镜像互不影响。

主要变更:
- 新建 Dockerfile.arm64,使用 Chromium 替代 Google Chrome
- 移除 GOARCH 硬编码,支持多架构构建
- 更新 GitHub Actions 工作流,添加独立的 ARM64 构建步骤
- ARM64 镜像使用独立标签:version-arm64 和 latest-arm64

技术说明:
- Google Chrome 不支持 Linux ARM64
- go-rod 会自动从 Playwright CDN 下载 ARM64 版 Chromium
- 两个架构的镜像构建相互独立,失败风险隔离

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-05 23:27:40 +08:00

54 lines
1.3 KiB
YAML

name: Docker Release
on:
workflow_dispatch:
inputs:
version:
description: 'Version tag (e.g., v1.0.0)'
required: true
default: 'v1.0.0'
permissions:
contents: read
jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: xpzouying
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image (AMD64)
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
platforms: linux/amd64
tags: |
xpzouying/xiaohongshu-mcp:${{ github.event.inputs.version }}
xpzouying/xiaohongshu-mcp:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build and push Docker image (ARM64)
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.arm64
push: true
platforms: linux/arm64
tags: |
xpzouying/xiaohongshu-mcp:${{ github.event.inputs.version }}-arm64
xpzouying/xiaohongshu-mcp:latest-arm64
cache-from: type=gha
cache-to: type=gha,mode=max