mpalmer / action-validator

Tool to validate GitHub Action and Workflow YAML files
GNU General Public License v3.0
277 stars 23 forks source link

Does not seem to detect GHA yaml syntax errors? #14

Closed brainstorm closed 1 year ago

brainstorm commented 2 years ago

After this gha error, I wanted to try an offline tool like yours, but apparently it doesn't seem to capture the syntax error I'm facing:

(base) rvalls@m1 reusable-github-actions % asdf exec action-validator .github/workflows/rust-check.yaml 
(base) rvalls@m1 reusable-github-actions % echo $?
0

Here's some more context if that helps:

% asdf info
OS:
Darwin m1.local 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:29 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T8101 arm64 arm Darwin

SHELL:
zsh 5.8.1 (x86_64-apple-darwin21.0)

ASDF VERSION:
v0.10.0

ASDF ENVIRONMENT VARIABLES:

ASDF INSTALLED PLUGINS:
action-validator             https://github.com/mpalmer/action-validator.git main 82d92a7
mpalmer commented 1 year ago

Howdy, thanks for reporting this. I've recently bumped the source of the JSON schemas that are the core of action-validator, and the workflow you referenced now causes an error, as I think you were expecting. The next release of action-validator (coming soon to an asdf near you!) should correctly catch this sort of problem. I've also added a test, based on your workflow, so that the problem shouldn't (ha!) be able to happen again.