c4bea63a5e
Sync CLAUDE.md with actual codebase structure: - Add controller layer (thin-router, fat-controller pattern) - Fix service paths (services/hermes/hermes-cli.ts) - Document 8 locales, Vitest testing, esbuild bundling - Add new modules: composables, profiles, gateways, codex-auth - Fix route registration (routes/index.ts, not routes/hermes/index.ts) - Add missing env vars (UPLOAD_DIR, CORS_ORIGINS, HERMES_BIN) - Update bootstrap sequence and auth middleware docs Also change docker-publish workflow to manual trigger only, and remove dev branch from build workflow trigger. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
41 lines
1.2 KiB
YAML
41 lines
1.2 KiB
YAML
name: Build and Push Docker Image to Docker Hub
|
|
|
|
on:
|
|
workflow_dispatch: # 仅手动触发
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
# 1. 检出当前仓库代码
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
# 2. 设置 QEMU (用于跨平台构建 ARM64)
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
# 3. 设置 Docker Buildx (用于构建镜像的高级工具)
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
# 4. 登录到 Docker Hub (使用你截图里配置的 Secrets)
|
|
- name: Log in to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
# 5. 构建并推送镜像 (支持 AMD64 和 ARM64)
|
|
- name: Build and push Docker image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile
|
|
platforms: linux/amd64,linux/arm64
|
|
push: true
|
|
tags: |
|
|
${{ secrets.DOCKERHUB_USERNAME }}/hermes-web-ui:latest
|
|
${{ secrets.DOCKERHUB_USERNAME }}/hermes-web-ui:${{ github.sha }}
|