-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (36 loc) · 995 Bytes
/
shellcheck.yml
File metadata and controls
40 lines (36 loc) · 995 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Shellcheck
on:
push:
branches: [ main ]
paths:
- '**.sh'
- '.shellcheckrc'
- '.github/workflows/shellcheck.yml'
pull_request:
branches: [ main ]
paths:
- '**.sh'
- '.shellcheckrc'
- '.github/workflows/shellcheck.yml'
workflow_dispatch:
jobs:
shellcheck:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@2.0.0
with:
severity: warning
- name: Verify shell scripts are executable
run: |
echo "Checking that all .sh files are executable..."
NON_EXECUTABLE=$(find . -type f -name "*.sh" ! -executable)
if [ -n "$NON_EXECUTABLE" ]; then
echo "ERROR: The following shell scripts are not executable:"
echo "$NON_EXECUTABLE"
exit 1
fi
echo "All shell scripts are executable"