Adopt gh actions-lock for GitHub Actions

已关闭 适合新手
#41 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
70/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
github, github-actions
领域
ci-cd

调研方向

从 .github/workflows/ 中现有的工作流文件开始,记录每一条通过标签或分支固定 action 版本的 uses: 行。安装 gh actions-lock 扩展并运行它,以生成 .github/workflows/actions.lock;然后添加 verify-lockfile.yml,让它在 pull request 和推送时运行 gh actions-lock --verify。当锁文件和验证工作流已提交,并且验证任务在一个 pull request 上通过时,即视为完成。

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

描述

GitHub Actions in this repository reference actions or reusable workflows by mutable tag or branch, and are not yet locked with gh actions-lock.

gh actions-lock keeps readable version tags in your uses: lines and records the exact commit SHA of every direct and transitive action in .github/workflows/actions.lock. A compromised or force-pushed tag can no longer silently change the code your workflows execute, and changes to the lockfile are visible in pull request diffs.

What is missing
  • No lockfile found at .github/workflows/actions.lock
  • No verify workflow found at .github/workflows/verify-lockfile.yml
What to do
  1. Install the extension and generate the lockfile:

    gh extension install github/gh-actions-lock
    gh actions-lock
    

    Keep version tags in uses: (for example actions/[email protected]). Any inline commit SHAs are rewritten back to version tags automatically.

  2. Add .github/workflows/verify-lockfile.yml, which runs gh actions-lock --verify on every pull request and push to catch drift or tampering.

  3. Commit .github/workflows/actions.lock and the verify workflow.

References
主要语言
Rust
星标
50
派生
9
平均合并
2 小时 49 分钟
30 天内合并 PR
1

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

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

esphome/esp-stacktrace-decoder 的其他 Issue

查看 esphome/esp-stacktrace-decoder 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

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