Skip to content

Commit 38c481c

Browse files
shellcheck.yml
1 parent 8dd3811 commit 38c481c

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/shellcheck.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: ShellCheck
2-
32
on:
43
push:
54
branches: [ main ]
@@ -11,12 +10,19 @@ jobs:
1110
runs-on: ubuntu-latest
1211
steps:
1312
- name: Checkout code
14-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1514

1615
- name: Install ShellCheck
1716
run: |
1817
sudo apt-get update
1918
sudo apt-get install -y shellcheck
2019
2120
- name: Run ShellCheck
22-
run: shellcheck add_whitelists.sh
21+
run: |
22+
shopt -s globstar nullglob
23+
files=(**/*.sh)
24+
if (( ${#files[@]} == 0 )); then
25+
echo "No shell scripts found."
26+
exit 0
27+
fi
28+
shellcheck -x "${files[@]}"

0 commit comments

Comments
 (0)