Convert the action from a Docker container action to a JavaScript (node24) action now that CLI v5 is a native binary

未关闭
#321 3 条评论 3 个 reaction 已指派 0 人 在 GitHub 查看

@minijus 已经在做这个了。

开始于 2026年10月24日。

  • #322 来自 @minijus —— 未关闭

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
docker, github-actions, javascript, node.js, typescript
领域
ci-cd, devtools

调研方向

Start by reading the action metadata (action.yml), Dockerfile, and entrypoint.sh to map the current inputs, outputs, and behavior. The issue proposes replacing these with a Node 24 action, CLI installation, and Octokit-based PR handling while preserving compatibility; define and implement that migration, then verify it across the listed runner platforms. The issue leaves substantial design and porting work, so it is not a small first contribution.

由索引模型根据 Issue 内容生成。

描述

Is your feature request related to a problem? Please describe.

crowdin/github-action is a Docker container action (runs.using: docker, image: Dockerfile). The runner builds the image from crowdin/cli every time a job uses the action, which means:

  • It only runs on Linux runners with a Docker daemon. It doesn't work on macOS or Windows runners (#160).
  • On self-hosted runners in Kubernetes (Actions Runner Controller), it requires Docker-in-Docker. DinD needs privileged pods, which many organizations don't allow. ARC's Kubernetes container-hooks mode doesn't support container actions built from a Dockerfile.
  • Every run pulls crowdin/cli from Docker Hub and installs packages from Alpine apk mirrors. This is slow, can hit Docker Hub rate limits, and is hard to allow in restricted or air-gapped networks, where npm is typically already proxied (Artifactory, Nexus, etc.).
  • Files written into the workspace are owned by root (#284).

Describe the solution you'd like

Crowdin CLI v5 no longer needs Java. @crowdin/cli now installs a prebuilt standalone binary through platform packages (@crowdin/cli-linux-x64, -linux-arm64, -darwin-x64, -darwin-arm64, -win32-x64, and musl variants). That removes the main reason for shipping the action as a container.

Proposal: rewrite the action as a JavaScript action (runs.using: node24) that:

  1. Installs the requested CLI version from npm, or downloads the release binary, caching it with @actions/tool-cache. Ideally it would also accept an optional input for an existing CLI on PATH or a custom npm registry.
  2. Ports entrypoint.sh to TypeScript using @actions/core, @actions/exec and Octokit. This replaces the bash, curl and jq steps for PR creation, labels, assignees and reviewers.
  3. Keeps the existing inputs and outputs so it's a drop-in replacement, released as a new major version (e.g. v4) so v3 users aren't affected.

Benefits:

  • Works on Linux, macOS, Windows, x64 and arm64 (resolves #160).
  • No Docker, DinD or privileged runners needed. Works with ARC in Kubernetes mode.
  • Faster startup, because there's no image build on every run.
  • Runs as the runner user, so there are no root-owned files (#284).
  • Dependencies come only from npm, which is easy to mirror.

Describe alternatives you've considered

  • A composite action that runs npm i -g @crowdin/cli and then the existing entrypoint.sh. This is a smaller change, but it still depends on bash, git, curl, jq and gpg being on the runner, and it doesn't help Windows.
  • Calling the CLI directly in workflow steps instead of using the action. That loses the action's PR and branch handling, which is the main value of the action.
  • Publishing a prebuilt image and using docker://. This avoids the per-run build but still requires Docker or DinD.

Additional context

Related: #160 (macOS runner support), #167 (ARM, closed as a duplicate of #160), #284 (root-owned files).

Happy to help test a pre-release on self-hosted ARC runners.

🤖 Generated by Claude Opus 5.5 (claude-opus-5.5)

主要语言
Shell
星标
244
派生
69
平均合并
4 天 23 小时
30 天内合并 PR
2

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

crowdin/github-action 的其他 Issue

查看 crowdin/github-action 的全部 Issue

相似的 Issue

更多 Shell/Bash Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。