ci: handle no shell files in the Shellcheck check
All checks were successful
actionlint check / actionlint check (pull_request) Successful in 6s
checkov check / checkov check (pull_request) Successful in 1m1s
conventional commit messages check / conventional commit messages check (pull_request) Successful in 5s
conventional pull request title check / conventional pull request title check (pull_request) Successful in 2s
dotenv-linter check / dotenv-linter check (pull_request) Successful in 5s
GitLeaks check / GitLeaks check (pull_request) Successful in 8s
hadolint check / hadolint check (pull_request) Successful in 8s
htmlhint check / htmlhint check (pull_request) Successful in 11s
markdownlint check / markdownlint check (pull_request) Successful in 12s
Prettier check / Prettier check (pull_request) Successful in 13s
Rust check / Rust check (pull_request) Successful in 15m35s
ShellCheck check / ShellCheck check (pull_request) Successful in 15s
Stylelint check / Stylelint check (pull_request) Successful in 12s
yamllint check / yamllint check (pull_request) Successful in 14s

This commit is contained in:
Matouš Volf 2025-01-03 13:45:17 +01:00
parent 9ce77897d8
commit 0ea3f3a118
Signed by: matous-volf
GPG Key ID: A23C7E16096933BE

View File

@ -25,4 +25,10 @@ jobs:
fetch-depth: 0
- name: ShellCheck check
# https://www.shellcheck.net/wiki/Recursiveness
run: find . -type f -name "*.sh" -print0 | xargs -0 shellcheck
run: |
if find . -type f -name "*.sh" -print0 | grep -qz .; then
find . -type f -name "*.sh" -print0 | xargs -0 shellcheck
exit 0
else
echo "No shell scripts found. Skipping ShellCheck."
fi