chore(ci): validate action metadata conventions - #6
Conversation
- add CI workflow to run actionlint - enforce node20 + dist/index.js conventions for all action.yml files - fix notify-on-failure package description and missing newline
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3d543af2f1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| set -euo pipefail | ||
| failed=0 | ||
| while IFS= read -r action_file; do | ||
| if ! grep -Eq "^[[:space:]]*using:[[:space:]]*'node20'[[:space:]]*$" "$action_file"; then |
There was a problem hiding this comment.
Parse action metadata instead of grepping text
The convention step only checks whether a line matching using: 'node20'/main: 'dist/index.js' appears anywhere in the file, so it can pass invalid metadata when those strings appear in comments, examples, or unrelated sections while runs.using/runs.main are actually different. In that scenario the workflow reports success even though the action runtime/entrypoint convention is violated, which defeats the purpose of this guard; using a YAML-aware check (or yq on runs.*) would make the validation semantic rather than textual.
Useful? React with 👍 / 👎.
|
Closing as superseded by #10, which merged the action metadata validation workflow after fixing the actionlint CI failure. |
Summary\n- add CI workflow to lint GitHub Action metadata with actionlint\n- add convention checks to enforce
runs.using: 'node20'andruns.main: 'dist/index.js'across all action packages\n- fix incorrect package description innotify-on-failure/package.jsonand normalize trailing newline in metadata file\n\n## Validation\n- local static convention check: passed\n- local actionlint: skipped (not installed in local environment); enforced in CI viareviewdog/actionlint\n\n## Why\nThis improves reliability by preventing metadata drift and keeps runtime/entrypoint standards consistent across all action modules.