Skip to content

Commit fbc4d89

Browse files
authored
ci: add Shell script linter (#9)
1 parent 8dec0c0 commit fbc4d89

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Generated by Gabo (https://github.com/ashishb/gabo)
2+
---
3+
# Run this locally with act - https://github.com/nektos/act
4+
# act -j lintShellScript
5+
name: Lint Shell scripts
6+
7+
on: # yamllint disable-line rule:truthy
8+
push:
9+
branches: [main, master]
10+
paths:
11+
- "**.sh"
12+
- "**.bash"
13+
- ".github/workflows/lint-shell-script.yaml"
14+
pull_request:
15+
branches: [main, master]
16+
paths:
17+
- "**.sh"
18+
- "**.bash"
19+
- ".github/workflows/lint-shell-script.yaml"
20+
21+
concurrency:
22+
group: ${{ github.workflow }}-${{ github.ref }}
23+
cancel-in-progress: true
24+
25+
# Ref: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token
26+
permissions:
27+
contents: read
28+
29+
jobs:
30+
31+
lintShellScript:
32+
runs-on: ubuntu-latest
33+
timeout-minutes: 15
34+
35+
steps:
36+
- name: Checkout repository
37+
uses: actions/checkout@v4
38+
with:
39+
persist-credentials: false
40+
41+
- name: Remove some files
42+
# These are some code files that fails shell lint and we don't want to modify these
43+
run: rm './braintest_or_ghostpush/tsnef(pessword)/post.sh'
44+
45+
- name: Run ShellCheck
46+
uses: ludeeus/action-shellcheck@2.0.0

0 commit comments

Comments
 (0)