Skip to content

feat: native github-actions check - #24

Merged
staff0rd merged 3 commits into
mainfrom
staff0rd/github-actions-schema-check
Oct 8, 2026
Merged

staff0rd merged 3 commits into
mainfrom
staff0rd/github-actions-schema-check

Conversation

@staff0rd

@staff0rd staff0rd commented Oct 8, 2026

Copy link
Copy Markdown
Member

What

Adds a recommended github-actions check, run by verifyx all and preselected by verifyx init. It validates workflows and action metadata against vendored SchemaStore schemas and fails trigger paths/paths-ignore globs that match no file. Each problem prints file:line:col and the failing rule.

Why

An invalid timeout-minutes key on a composite action step stopped the runner loading the action, and no check caught it. The @action-validator/cli workaround is stale on npm, POSIX-only and GPL-3.0.

How

Validation is ajv against the Apache-2.0 SchemaStore schemas shipped in schemas/, so it needs no network at runtime. npm run schemas:refresh updates them. Repos with workflows that break the schema will start failing when they upgrade.

@staff0rd staff0rd left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review summary

Findings: 2 (blocker 0, major 1, minor 1, nit 0)

The schema-validation part of the new github-actions check is solid. The vendored schemas resolve from both src/ and dist/, ajv compiles them, and the tests check exact error output. The main risk is the custom GitHub glob translator in githubPathFilter.ts. It does not let **/ match zero directories, so common, valid path filters are reported as dead. Because the check is recommended and runs in verifyx all, this would fail CI on correct workflows. A smaller issue: negated globs are checked against the wrong file set, which lets some negations that exclude nothing go unreported.

Findings

  • major: **/ cannot match zero directories, so valid path filters are reported as dead
  • minor: Each negated glob is checked against all earlier positive matches instead of the files still included

Comment thread src/checks/githubPathFilter.ts Outdated
Comment thread src/checks/githubPathFilter.ts Outdated
@staff0rd
staff0rd enabled auto-merge October 8, 2026 03:46
@staff0rd
staff0rd merged commit 701ba01 into main Oct 8, 2026
1 check passed
@staff0rd
staff0rd deleted the staff0rd/github-actions-schema-check branch October 8, 2026 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants