镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

feat: lightweight gh aw lint — actionlint-only over existing .lock.yml files (no recompile, no zizmor/poutine) #30704

Closed

Description

@bryanchen-d

Summary

Provide a lightweight gh aw lint (or gh aw validate --lock-only) subcommand that runs only actionlint over existing .lock.yml files on disk, without recompiling the .md source, running zizmor/poutine, or emitting frontmatter-related warnings. This is the smallest CI gate that would have caught #30695 at PR time.

Motivation

Today there are three options, none of which fit the "pre-merge, fast, lock-file-only" niche:

Command What it does Fit for "is the on-disk lock file parseable?"
gh aw validate recompile + zizmor + actionlint + poutine Heavy. Also rejects hand-patched lock files because they no longer match a fresh recompile.
gh aw compile --no-emit --actionlint recompile in memory + actionlint on the in-memory output Doesn't validate the file on disk. Also surfaces unrelated frontmatter warnings (e.g. "This workflow grants id-token: write permission").
actionlint .github/workflows/*.lock.yml directly external tool Works (we just shipped this in microsoft/vscode-engineering#2733) but loses the benefit of gh-aw managing the actionlint version and any awareness of gh-aw-specific constructs (e.g. the job.workflow_repository / workflow_sha / workflow_ref / workflow_file_path properties newer lock files reference, which v1.7.12 doesn't know about — so we had to add -ignore flags).

Concrete asks

A new subcommand, e.g.:

gh aw lint                              # actionlint all .github/workflows/*.lock.yml
gh aw lint .github/workflows/foo.lock.yml
gh aw lint --dir .github/workflows

Behavior:

  1. Read existing .lock.yml files from disk. Do not recompile. Do not require the matching .md to be present or up-to-date.
  2. Run only actionlint (the same actionlint instance gh-aw already vendors / wraps, with whatever ignore-list / type-extensions are needed for gh-aw-emitted contexts like job.workflow_*). No zizmor, no poutine, no compile-time validators.
  3. Exit non-zero on any actionlint error. Suppress shellcheck/pyflakes integrations by default (or expose flags) since lock-file run: blocks are machine-generated.
  4. Be fast (≤1s for ~30 lock files). No Docker, no network.

Why this matters

Related

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions