Migrate to OIDC on publishing npm packages in GitHub Actions
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
调研方向
从 issue 中列出的未勾选 workflow 文件开始,尤其是 nodejs/node-core-test 和 nodejs/caritat,并将它们与已勾选的迁移进行比较。首先验证 npm trusted-publisher 的要求和现有的 workflow 权限。当剩余的 npm 发布 workflow 不再使用 NPM_TOKEN,并具备所需的 OIDC 配置时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
See https://docs.npmjs.com/trusted-publishers for documentations.
[!note]
Trusted publishing requires npm CLI version 11.5.1 or later.
TL;DR: add the following section in the workflow file to replace ${secrets.NPM_TOKEN}, and create OICD connection on https://www.npmjs.com/package/<package-name>/access:
permissions:
id-token: write # Required for OIDC
contents: read
This should help us get rid of npm tokens in GitHub Actions for publishing packages.
Quick search on npm token usages: https://github.com/search?q=org%3Anodejs+path%3A%22.github%2Fworkflows%22+%22npm+publish%22&type=code
- 主要语言
- JavaScript
- 星标
- 202
- 派生
- 183
- 平均合并
- 2 分钟
- 30 天内合并 PR
- 1
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nodejs/admin 的其他 Issue
-
tsc-agenda
难度 5/5 一周以上 新手友好度 30/100
-
难度 5/5 一周以上 新手友好度 35/100
-
难度 5/5 一周以上 新手友好度 35/100
-
难度 5/5 一周以上 新手友好度 30/100
-
难度 1/5 1 小时以内 新手友好度 35/100
相似的 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 70/100
babalae/bettergi-scripts-list#3674 ·
-
ecosystem wording
难度 1/5 1 小时以内 新手友好度 90/100
matrix-org/matrix.org#3649 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
vadimdemedes/ink#1029 ·
-
code-quality refactoring
难度 2/5 1-3 小时 新手友好度 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
难度 2/5 1-3 小时 新手友好度 74/100
langchain-ai/deepagents#6450 ·