Skip to content
This repository was archived by the owner on Sep 12, 2024. It is now read-only.

Commit 7ed9f19

Browse files
committed
Add github actions for shell check
1 parent 00e9fda commit 7ed9f19

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Check Shell Script Syntax
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/[email protected]
11+
- name: Get Diff Action
12+
uses: technote-space/[email protected]
13+
with:
14+
SUFFIX_FILTER: .sh
15+
- name: Install ShellCheck
16+
run: |
17+
sudo apt-get install shellcheck
18+
if: env.GIT_DIFF
19+
- name: Lint with ShellCheck
20+
run: |
21+
shellcheck --shell=bash -x ${{ env.GIT_DIFF }}
22+
if: env.GIT_DIFF

0 commit comments

Comments
 (0)