actionlint
actionlint copied to clipboard
Feature request: Check that globs in `on.*.paths` match at least one file
It would be useful to me if Actionlint could report when globs in on.*.paths
don't match any files.
The following shell pipeline approximates what I'd like to do:
git ls-files -- '.github/workflows/*.yml' \
| parallel "yq -o json {} | jq -r '.on | to_entries[].value | .paths // empty | .[]' 2>/dev/null" \
| sort -u \
| parallel -k --bar --tag "git ls-files --error-unmatch :{} >/dev/null"
However, this obviously uses Git's pattern syntax which probably differs from GitHub's in some subtle respects.