From 7e739b70a255155c9de7e7bd28a5a8f065eabf2e Mon Sep 17 00:00:00 2001 From: ekko <152005280+EKKOLearnAI@users.noreply.github.com> Date: Tue, 21 Apr 2026 14:22:22 +0800 Subject: [PATCH] ci: add ARM64 support for Docker image build (#101) * feat(chat): polish syntax highlighting and tool payload rendering (#94) * [verified] feat(chat): polish syntax highlighting and tool payload rendering * [verified] fix(chat): tighten large tool payload rendering * docs: update data volume path in Docker docs Align documentation with docker-compose.yml change: hermes-web-ui-data -> hermes-web-ui, /app/dist/data -> /root/.hermes-web-ui Co-Authored-By: Claude Opus 4.6 * refactor: bundle server build and restructure service modules - Add build-server.mjs script for standalone server compilation - Add logger service with structured output - Restructure auth, gateway-manager, hermes-cli, hermes services - Update docker-compose volume mount path - Update tsconfig and entry point for bundled server Co-Authored-By: Claude Opus 4.6 * refactor: separate controllers from routes and centralize route registration - Extract business logic from route handlers into controllers/ - Add centralized route registry in routes/index.ts with public/auth/protected layers - Replace global auth whitelist with sequential middleware registration - Extract shared helpers to services/config-helpers.ts - Allow custom provider name to be user-editable in ProviderFormModal - Deduplicate custom providers by poolKey instead of base_url in getAvailable Co-Authored-By: Claude Opus 4.6 * fix: auth bypass via path case, SPA serving, and provider improvements - Fix auth bypass: path case-insensitive check for /api, /v1, /upload - Fix SPA returning 401: skip auth for non-API paths (static files) - Fix profile switch: use local loading state instead of shared store ref - Auto-append /v1 to base_url when fetching models (frontend + backend) - Guard .env writing to built-in providers only - Add builtin field to provider presets, enable base_url input in form - Print auth token to console on startup (pino only writes to file) Co-Authored-By: Claude Opus 4.6 * fix(docker): correct volume mount path and update Node.js to 23 - Fix webui volume mount from /root/.hermes-web-ui to /home/agent/.hermes-web-ui (container runs as agent user, homedir() returns /home/agent) - Update Node.js from 22 to 23 in Dockerfile Co-Authored-By: Claude Opus 4.6 * ci: add ARM64 support for Docker image build Add QEMU and multi-platform build (linux/amd64,linux/arm64) so the image works on Apple Silicon and ARM-based NAS devices. Co-Authored-By: Claude Opus 4.6 --------- Co-authored-by: Zhicheng Han <43314240+hanzckernel@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 --- .github/workflows/docker-publish.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index fd73f1c..88afafc 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -10,32 +10,35 @@ on: jobs: build-and-push: runs-on: ubuntu-latest - + steps: # 1. 检出当前仓库代码 - name: Checkout repository uses: actions/checkout@v4 - # 2. 设置 Docker Buildx (用于构建镜像的高级工具) + # 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 - # 3. 登录到 Docker Hub (使用你截图里配置的 Secrets) + # 4. 登录到 Docker Hub (使用你截图里配置的 Secrets) - name: Log in to Docker Hub uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - # 4. 构建并推送镜像 + # 5. 构建并推送镜像 (支持 AMD64 和 ARM64) - name: Build and push Docker image uses: docker/build-push-action@v5 with: context: . - # 根据仓库根目录的 Dockerfile 构建 - file: ./Dockerfile + file: ./Dockerfile + platforms: linux/amd64,linux/arm64 push: true - # 这里的标签会自动加上你的 DockerHub 用户名,以及 hermes-web-ui 仓库名 tags: | ${{ secrets.DOCKERHUB_USERNAME }}/hermes-web-ui:latest ${{ secrets.DOCKERHUB_USERNAME }}/hermes-web-ui:${{ github.sha }}