Skip to content

Commit e9e6ad0

Browse files
authored
feat(ci): add shellcheck
1 parent dd53a47 commit e9e6ad0

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: 🐚 GA-Misc - ShellCheck
2+
3+
on:
4+
pull_request:
5+
paths-ignore:
6+
- '.github/**'
7+
8+
types: [opened, reopened, synchronize]
9+
10+
jobs:
11+
GA-Misc-Check-ShellCheck:
12+
name: 🐚 Run ShellCheck
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: 🐧 Check out repository code
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: πŸ” Get all changed SHELL files
22+
id: changed-file-list
23+
run: |
24+
echo "changed_files=$(git diff --name-only --diff-filter=ACMRT --merge-base origin/master | grep -E "\.sh$" | xargs)" >> $GITHUB_OUTPUT
25+
26+
- name: πŸ§™β€β™‚οΈ Run Format checks
27+
if: steps.changed-file-list.outputs.changed_files != ''
28+
run: |
29+
npm i -g shellcheck
30+
npx shellcheck ${{ steps.changed-file-list.outputs.changed_files }}

0 commit comments

Comments
Β (0)