Skip to content

Conversation

@shiwuliya
Copy link
Contributor

@shiwuliya shiwuliya commented Dec 23, 2025

移除原有的docker.yaml工作流文件,该文件负责构建amd64和arm64架构的
Docker镜像并推送到DockerHub和GHCR。

更新release.yml工作流,在发布流程中调用KarinJS/karin-docker仓库
的docker.yaml工作流来处理Docker镜像构建。

更新core包的@karinjs/node-pty依赖版本从1.1.0到1.1.3。

移除packages/docker目录下的Dockerfile、docker.sh和start.sh文件, 这些文件的维护已迁移到独立的karin-docker仓库

Summary by Sourcery

在发布过程中将 Docker 镜像构建路由到外部的 karin-docker 仓库,并清理仓库内的 Docker 相关资源。

Enhancements:

  • 从发布工作流中触发 karin-docker 仓库的 docker.yaml 工作流,以处理 Docker 镜像构建。
  • 将 core 包中的开发依赖 @karinjs/node-pty 从 1.1.0 升级到 1.1.3。
  • 移除已废弃的仓库内 Docker 工作流和现由外部 karin-docker 仓库维护的 Docker 相关文件。

Build:

  • 调整发布工作流配置,包括 npm registry URL 的引号设置以及用于 Docker 构建的跨仓库工作流触发。

CI:

  • 删除旧的 .github/workflows/docker.yaml 工作流,改用共享的 karin-docker 工作流。
Original summary in English

Summary by Sourcery

Route Docker image builds to the external karin-docker repository during release and clean up in-repo Docker assets.

Enhancements:

  • Trigger the karin-docker repository's docker.yaml workflow from the release workflow to handle Docker image builds.
  • Bump the @karinjs/node-pty dev dependency in the core package from 1.1.0 to 1.1.3.
  • Remove the obsolete in-repo Docker workflow and Docker-related files now managed by the external karin-docker repository.

Build:

  • Adjust release workflow configuration, including npm registry URL quoting and cross-repo workflow dispatch for Docker builds.

CI:

  • Delete the legacy .github/workflows/docker.yaml workflow in favor of the shared karin-docker workflow.

Summary by CodeRabbit

  • Chores
    • Removed Docker container support and related CI/CD automation workflows
    • Updated development dependencies

✏️ Tip: You can customize this high-level summary in your review settings.

移除原有的docker.yaml工作流文件,该文件负责构建amd64和arm64架构的
Docker镜像并推送到DockerHub和GHCR。

更新release.yml工作流,在发布流程中调用KarinJS/karin-docker仓库
的docker.yaml工作流来处理Docker镜像构建。

更新core包的@karinjs/node-pty依赖版本从1.1.0到1.1.3。

移除packages/docker目录下的Dockerfile、docker.sh和start.sh文件,
这些文件的维护已迁移到独立的karin-docker仓库
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Dec 23, 2025

审阅者指南(在小型 PR 上折叠)

审阅者指南

此 PR 移除了仓库内的 Docker 构建工作流和 Docker 资源,将 Docker 镜像构建委托给通过发布工作流触发的外部 KarinJS/karin-docker 仓库,并在 core 包中提升了 @karinjs/node-pty 依赖版本。

触发外部 Docker 构建的发布工作流时序图

sequenceDiagram
  actor Maintainer
  participant GitHub as GitHub_Repo
  participant ReleaseWF as release_yml_workflow
  participant Dispatch as workflow_dispatch_action
  participant DockerRepo as karin_docker_repo
  participant DockerWF as docker_yaml_workflow
  participant DockerHub as DockerHub
  participant GHCR as GHCR

  Maintainer->>GitHub: push tag or create release
  GitHub-->>ReleaseWF: trigger release.yml

  ReleaseWF->>ReleaseWF: run release-please and publish packages
  ReleaseWF->>ReleaseWF: check core component released

  alt core release is true
    ReleaseWF->>Dispatch: call benc-uk/workflow-dispatch
    Dispatch->>DockerRepo: dispatch docker.yaml workflow
    DockerRepo-->>DockerWF: start docker.yaml

    DockerWF->>DockerWF: build amd64 and arm64 images
    DockerWF->>DockerHub: push images
    DockerWF->>GHCR: push images
  else core release is false
    ReleaseWF-->>Maintainer: skip external docker build
  end
Loading

文件级变更

变更 详情 文件
在发布工作流中将 Docker 镜像的构建与发布委托给外部 karin-docker 仓库。
  • 调整 release.yml 中的 Node 设置步骤,将 npm registry URL 改为使用单引号以保持一致性。
  • 更新 release 任务,在 workflow-dispatch 步骤中指定目标仓库为 KarinJS/karin-docker,从而在该仓库中触发 docker.yaml 工作流,而不是触发本地工作流。
.github/workflows/release.yml
升级 core 包对 @karinjs/node-pty 的依赖。
  • 将 core 包中 @karinjs/node-pty 的 devDependency 从 ^1.1.0 提升到 ^1.1.3。
  • 保持 pnpm-lock.yaml 与新的依赖版本同步(在审阅锁文件变更时留意是否有额外的传递依赖更新)。
packages/core/package.json
pnpm-lock.yaml
移除已迁移至 karin-docker 仓库的、已废弃的仓库内 Docker 构建工作流和 Docker 打包脚本。
  • 删除在 CI 中构建并推送 amd64/arm64 Docker 镜像到 DockerHub 和 GHCR 的工作流。
  • 移除 packages/docker 下的 Dockerfile 和辅助脚本,这些现已在独立的 karin-docker 仓库中管理。
.github/workflows/docker.yaml
packages/docker/Dockerfile
packages/docker/docker.sh
packages/docker/start.sh

技巧与命令

与 Sourcery 交互

  • 触发新的审阅: 在 pull request 上评论 @sourcery-ai review
  • 继续讨论: 直接回复 Sourcery 的审阅评论。
  • 从审阅评论生成 GitHub issue: 通过回复某条审阅评论,要求 Sourcery 从该评论创建一个 issue。你也可以直接回复该评论 @sourcery-ai issue 来从中创建 issue。
  • 生成 pull request 标题: 在 pull request 标题中的任意位置写入 @sourcery-ai 即可随时生成一个标题。你也可以在 pull request 上评论 @sourcery-ai title 来(重新)生成标题。
  • 生成 pull request 总结: 在 pull request 描述正文中的任意位置写入 @sourcery-ai summary,即可在你想要的位置生成 PR 总结。你也可以在 pull request 上评论 @sourcery-ai summary 来(重新)生成总结。
  • 生成审阅者指南: 在 pull request 上评论 @sourcery-ai guide,即可随时(重新)生成审阅者指南。
  • 一次性解决所有 Sourcery 评论: 在 pull request 上评论 @sourcery-ai resolve,即可将所有 Sourcery 评论标记为已解决。如果你已经处理完所有评论并且不想再看到它们,这会很有用。
  • 一次性忽略所有 Sourcery 审阅: 在 pull request 上评论 @sourcery-ai dismiss,即可忽略所有现有的 Sourcery 审阅。若你希望从一次全新的审阅开始,这尤其有用——别忘了随后评论 @sourcery-ai review 来触发新的审阅!

自定义你的使用体验

访问你的 dashboard 以:

  • 启用或禁用审阅功能,例如 Sourcery 生成的 pull request 总结、审阅者指南等。
  • 更改审阅语言。
  • 添加、移除或编辑自定义审阅说明。
  • 调整其他审阅设置。

获取帮助

Original review guide in English
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR removes the in-repo Docker build workflow and Docker assets, delegates Docker image builds to the external KarinJS/karin-docker repository via the release workflow, and bumps the @karinjs/node-pty dependency version in the core package.

Sequence diagram for release workflow triggering external docker build

sequenceDiagram
  actor Maintainer
  participant GitHub as GitHub_Repo
  participant ReleaseWF as release_yml_workflow
  participant Dispatch as workflow_dispatch_action
  participant DockerRepo as karin_docker_repo
  participant DockerWF as docker_yaml_workflow
  participant DockerHub as DockerHub
  participant GHCR as GHCR

  Maintainer->>GitHub: push tag or create release
  GitHub-->>ReleaseWF: trigger release.yml

  ReleaseWF->>ReleaseWF: run release-please and publish packages
  ReleaseWF->>ReleaseWF: check core component released

  alt core release is true
    ReleaseWF->>Dispatch: call benc-uk/workflow-dispatch
    Dispatch->>DockerRepo: dispatch docker.yaml workflow
    DockerRepo-->>DockerWF: start docker.yaml

    DockerWF->>DockerWF: build amd64 and arm64 images
    DockerWF->>DockerHub: push images
    DockerWF->>GHCR: push images
  else core release is false
    ReleaseWF-->>Maintainer: skip external docker build
  end
Loading

File-Level Changes

Change Details Files
Delegate Docker image build and publish to external karin-docker repository in the release workflow.
  • Adjust release.yml Node setup step to use single-quoted npm registry URL for consistency.
  • Update the release job to dispatch the docker.yaml workflow in the KarinJS/karin-docker repository instead of the local workflow by specifying the target repo in the workflow-dispatch step.
.github/workflows/release.yml
Upgrade core package dependency on @karinjs/node-pty.
  • Bump @karinjs/node-pty devDependency from ^1.1.0 to ^1.1.3 in the core package.
  • Keep pnpm-lock.yaml in sync with the new dependency version (review lockfile changes for any additional transitive updates).
packages/core/package.json
pnpm-lock.yaml
Remove obsolete in-repo Docker build workflow and Docker packaging scripts that were migrated to karin-docker repo.
  • Delete the CI workflow that built and pushed amd64/arm64 Docker images to DockerHub and GHCR.
  • Remove the Dockerfile and helper scripts under packages/docker now managed in the separate karin-docker repository.
.github/workflows/docker.yaml
packages/docker/Dockerfile
packages/docker/docker.sh
packages/docker/start.sh

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link

coderabbitai bot commented Dec 23, 2025

Walkthrough

The PR removes the Docker CI/CD workflow pipeline, Dockerfile, and associated shell scripts (installer and startup), while adjusting the release workflow to dispatch to an external docker workflow repository and bumping a dev dependency.

Changes

Cohort / File(s) Summary
CI/CD Workflows
.github/workflows/docker.yaml, .github/workflows/release.yml
Removes entire multi-job Docker build/push/manifest pipeline; modifies release workflow to add external docker repository dispatch endpoint and corrects registry URL quote syntax.
Docker Build & Runtime Configuration
packages/docker/Dockerfile, packages/docker/docker.sh, packages/docker/start.sh
Removes Dockerfile (Node.js image definition with dependencies), installer script (curl/Docker checks, container setup), and startup script (port/env setup, pnpm execution).
Package Dependency
packages/core/package.json
Bumps @karinjs/node-pty from ^1.1.0 to ^1.1.3; adds trailing newline.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • fix: 优化ci #584: Modifies .github/workflows/release.yml and adjusts the syncn/workflow-dispatch job configuration with overlapping concerns.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removing the docker.yaml workflow and updating the release process. It matches the primary objectives of migrating Docker maintenance to a separate repository.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b441c1d and 85c778a.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (6)
  • .github/workflows/docker.yaml
  • .github/workflows/release.yml
  • packages/core/package.json
  • packages/docker/Dockerfile
  • packages/docker/docker.sh
  • packages/docker/start.sh
💤 Files with no reviewable changes (4)
  • packages/docker/start.sh
  • packages/docker/docker.sh
  • .github/workflows/docker.yaml
  • packages/docker/Dockerfile
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Sourcery review
  • GitHub Check: publish-temp
🔇 Additional comments (2)
.github/workflows/release.yml (1)

108-110: No issues found. The target repository KarinJS/karin-docker exists and is publicly accessible, and the docker.yaml workflow is active and ready to be dispatched. The external workflow dispatch configuration is properly set up.

packages/core/package.json (1)

183-183: Dependency version verified. The dev dependency @karinjs/node-pty version 1.1.3 exists on the npm registry as the latest version and has no known security vulnerabilities. The patch-level bump from ^1.1.0 to ^1.1.3 is valid and backward compatible.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link

Summary of Changes

Hello @shiwuliya, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

此拉取请求旨在优化项目的持续集成和发布流程,通过将 Docker 镜像的构建和管理职责转移到一个专门的外部仓库,显著简化了主仓库的工作流。同时,它还更新了一个核心依赖,并对锁定文件进行了细致的调整,以确保构建环境的稳定性和兼容性。

Highlights

  • 工作流迁移: 移除了原有的 docker.yaml 工作流,并将 Docker 镜像的构建和推送逻辑迁移至独立的 KarinJS/karin-docker 仓库,通过 release.yml 工作流进行调用。
  • Docker 文件移除: 删除了 packages/docker 目录下的 Dockerfile、docker.sh 和 start.sh 文件,以配合 Docker 镜像构建流程的外部化。
  • 依赖更新: 将 core 包中的 @karinjs/node-pty 依赖版本从 1.1.0 更新至 1.1.3。
  • 锁定文件优化: pnpm-lock.yaml 文件更新,除了反映依赖版本变化外,还为多个原生模块(如 sqlite3-napi、parcel/watcher、rollup、swc/core、unrs/resolver-binding)增加了 libc 规范,提高了构建的精确性。

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Ignored Files
  • Ignored by pattern: .github/workflows/** (2)
    • .github/workflows/docker.yaml
    • .github/workflows/release.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - 我在这里给出了一些总体反馈:

  • 建议将 benc-uk/workflow-dispatch 固定到某个特定的提交 SHA(或者至少是一个主版本+次版本标签),而不是使用 @v1,以降低上游改动带来的意外行为风险。
  • 当通过 workflow-dispatch 将 Docker 构建委托给 KarinJS/karin-docker 时,你可能需要配置类似 ref/分支以及 wait-for-completion(如果适用)这样的选项,这样发布工作流就能更明确地控制使用哪一个修订版本,以及如何暴露失败信息。
给 AI Agent 的提示
Please address the comments from this code review:

## Overall Comments
- Consider pinning `benc-uk/workflow-dispatch` to a specific commit SHA (or at least a major+minor tag) instead of `@v1` to reduce the risk of unexpected behavior from upstream changes.
- When delegating the Docker build to `KarinJS/karin-docker` via `workflow-dispatch`, you may want to configure options like `ref`/branch and `wait-for-completion` (if applicable) so that the release workflow has clear control over which revision is used and how failures are surfaced.

Sourcery 对开源项目是免费的——如果你喜欢我们的代码评审,请考虑分享给他人 ✨
帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈改进后续评审。
Original comment in English

Hey - I've left some high level feedback:

  • Consider pinning benc-uk/workflow-dispatch to a specific commit SHA (or at least a major+minor tag) instead of @v1 to reduce the risk of unexpected behavior from upstream changes.
  • When delegating the Docker build to KarinJS/karin-docker via workflow-dispatch, you may want to configure options like ref/branch and wait-for-completion (if applicable) so that the release workflow has clear control over which revision is used and how failures are surfaced.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider pinning `benc-uk/workflow-dispatch` to a specific commit SHA (or at least a major+minor tag) instead of `@v1` to reduce the risk of unexpected behavior from upstream changes.
- When delegating the Docker build to `KarinJS/karin-docker` via `workflow-dispatch`, you may want to configure options like `ref`/branch and `wait-for-completion` (if applicable) so that the release workflow has clear control over which revision is used and how failures are surfaced.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@github-actions
Copy link
Contributor

你可以通过以下命令安装该版本:

pnpm add https://pkg.pr.new/KarinJS/Karin/node-karin@85c778a -w

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

本次 PR 主要重构了 Docker 镜像的构建流程,移除了旧的 docker.yaml 工作流和相关的 Dockerfile 及脚本,改为在发布流程中调用外部共享的工作流。同时,更新了 @karinjs/node-pty 依赖。

整体来看,将 Docker 相关逻辑抽离到独立的仓库是一个很好的实践,有助于解耦和统一管理。

在代码审查中,我主要关注了被移除的文件,并针对其中一些实现方式提出了建议。这些建议旨在为新的 karin-docker 仓库中的实现提供参考,以提高安全性、健壮性和用户体验。具体评论请见文件中的详细说明。

I am having trouble creating individual review comments. Click here to see my feedback.

packages/docker/docker.sh (42)

high

虽然此文件将被移除,但注意到这里通过 curl | bash 的方式安装 Docker。这存在安全风险,因为无法在执行前审查脚本内容。在新的 karin-docker 仓库中,建议考虑更安全的安装方式,例如先下载脚本,校验后再执行,或者引导用户遵循 Docker 官方文档进行安装。这可以防止潜在的恶意脚本攻击。

packages/docker/Dockerfile (10-13)

medium

这个 RUN 指令在构建镜像时动态初始化和安装依赖,这可能会导致构建过程变慢且结果不确定(因为 node-karin 没有指定版本)。虽然此文件将被删除,但在新的 Dockerfile 实现中,建议将项目文件(如 package.json, pnpm-lock.yamlCOPY 到镜像中,然后运行 pnpm install。这样可以利用 Docker 的层缓存机制,并确保依赖版本的确定性,从而构建更快、更可靠的镜像。

packages/docker/docker.sh (58-63)

medium

此脚本直接修改了用户的 ~/.bashrc 文件来添加别名。这种做法可能对用户的环境有侵入性。此外,它只考虑了 bash,而用户可能使用 zsh (.zshrc)、fish (config.fish) 等其他 shell。在新的实现中,建议在脚本末尾向用户显示需要添加的别名信息,并指导他们根据自己使用的 shell 手动添加到对应的配置文件中,这样更安全也更灵活。

packages/docker/docker.sh (64)

medium

注意到这里使用了 source ~/.bashrc。这个命令只会对当前脚本的 shell 会话生效,当脚本执行完毕后,新添加的别名 karinkr 在用户的当前终端中并不会立即可用,用户需要手动执行 source ~/.bashrc 或开启新的终端会话。为了改善用户体验,可以在脚本末尾提示用户需要执行的操作。

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.

1 participant