Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Feature: warn when workflow YAML validates but would fail at runtime (schema vs runner gap)

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

还没有人认领这个 Issue。

评估

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

调研方向

首先跟踪现有的 workflow YAML schema 验证入口,以及 API 树已经使用的已认证会话。检查 action.yml 文件和 workflow 触发器是如何解析的,然后确定四个 opt-in 运行时检查和 workflow-file-hash 缓存如何与验证并列配合。完成标准是:可忽略的 Information 诊断会在打开和保存时运行,且不会阻止保存。

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

描述

Summary

Extension validates workflow YAML against the schema, but many mistakes only surface after git push triggers a runner:

  • runs-on: referencing a self-hosted label that has no online runner
  • uses: owner/repo@ref where ref no longer resolves (deleted tag/branch, moved SHA)
  • secrets: inherit on a reusable workflow whose caller does not actually inherit
  • permissions: narrower than what a step needs (e.g. contents: read + a step that pushes)
  • if: expression referencing a context that is empty for the trigger (e.g. github.event.pull_request.* on push)

Each case validates green locally, then burns a runner minute and a red X on the PR.

Proposal

A "runtime-plausibility" pass, opt-in (github-actions.runtimeChecks.enabled), that runs alongside schema validation and surfaces Information-level diagnostics for:

  1. Unresolvable uses: refs (HEAD probe via the authenticated session already used for the API tree)
  2. runs-on: labels not present in the repo's runner list
  3. permissions: narrower than the union of permissions declared by any resolvable action's action.yml
  4. Context references that are empty for the declared on: triggers

None block save; all are dismissible. Runs on open + on save, cached by workflow-file hash.

Why not act / nektos

act runs the whole workflow in Docker; this is a static, seconds-scale lint. Complementary, not overlapping.

Related
  • #593 (commit-pinned actions reported unresolved) - same "static analysis of uses:" surface
  • #609 (false-positive missing-required-inputs) - related schema-vs-runtime gap in the other direction
主要语言
TypeScript
星标
661
派生
214
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

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

github/vscode-github-actions 的其他 Issue

查看 github/vscode-github-actions 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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