feat: add manual Docker release workflow (#187)
- 新增 docker-release.yml workflow,支持手动触发 Docker 镜像构建 - 从 release.yml 中移除自动 Docker 构建,避免镜像膨胀 - 使用语义化版本号策略(如 v1.0.0) - 支持多平台构建(linux/amd64, linux/arm64) - 硬编码公开信息,只需配置 DOCKERHUB_TOKEN secret - 自动标记版本号和 latest 标签 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
40
.github/workflows/docker-release.yml
vendored
Normal file
40
.github/workflows/docker-release.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
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
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: |
|
||||
xpzouying/xiaohongshu-mcp:${{ github.event.inputs.version }}
|
||||
xpzouying/xiaohongshu-mcp:latest
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -142,6 +142,10 @@ jobs:
|
||||
./xiaohongshu-mcp-darwin-arm64
|
||||
```
|
||||
|
||||
### 🐳 Docker 镜像
|
||||
|
||||
Docker 镜像需要手动触发构建,请到 Actions 页面运行 "Docker Release" workflow。
|
||||
|
||||
### 📊 构建信息
|
||||
|
||||
- **Commit**: ${{ github.sha }}
|
||||
|
||||
Reference in New Issue
Block a user