Skip to content

Commit 7e2ae45

Browse files
committed
Add github action to shellcheck master on push and PRs
1 parent 708ef24 commit 7e2ae45

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

.github/workflows/shellcheck.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: Shellcheck
3+
4+
on:
5+
push:
6+
branches: [master]
7+
pull_request:
8+
branches: [master]
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
shellcheck:
15+
name: Check shell scripts
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
- name: Install dependencies
22+
run: |
23+
sudo apt update && sudo apt install -y shellcheck
24+
- name: shellcheck
25+
run: |
26+
git grep -l '^#\( *shellcheck \|!\(/bin/\|/usr/bin/env \)\(sh\|bash\|dash\|ksh\)\)' | xargs shellcheck

0 commit comments

Comments
 (0)