ci: handle no shell files in the Shellcheck check
All checks were successful
yamllint check / yamllint check (pull_request) Successful in 15s
actionlint check / actionlint check (pull_request) Successful in 5s
checkov check / checkov check (pull_request) Successful in 48s
conventional commit messages check / conventional commit messages check (pull_request) Successful in 4s
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 7s
hadolint check / hadolint check (pull_request) Successful in 7s
htmlhint check / htmlhint check (pull_request) Successful in 9s
markdownlint check / markdownlint check (pull_request) Successful in 9s
Prettier check / Prettier check (pull_request) Successful in 10s
Rust check / Rust check (pull_request) Successful in 15m14s
ShellCheck check / ShellCheck check (pull_request) Successful in 15s
Stylelint check / Stylelint check (pull_request) Successful in 12s

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

View File

@ -24,5 +24,10 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: ShellCheck check - name: ShellCheck check
# https://www.shellcheck.net/wiki/Recursiveness run: |
run: find . -type f -name "*.sh" -print0 | xargs -0 shellcheck 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