-
Notifications
You must be signed in to change notification settings - Fork 387
46 lines (38 loc) · 1.19 KB
/
Copy pathlint-shell-script.yaml
File metadata and controls
46 lines (38 loc) · 1.19 KB
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
41
42
43
44
45
46
# Generated by Gabo (https://github.com/ashishb/gabo)
---
# Run this locally with act - https://github.com/nektos/act
# act -j lintShellScript
name: Lint Shell scripts
on: # yamllint disable-line rule:truthy
push:
branches: [main, master]
paths:
- "**.sh"
- "**.bash"
- ".github/workflows/lint-shell-script.yaml"
pull_request:
branches: [main, master]
paths:
- "**.sh"
- "**.bash"
- ".github/workflows/lint-shell-script.yaml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# Ref: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token
permissions:
contents: read
jobs:
lintShellScript:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Remove some files
# These are some code files that fails shell lint and we don't want to modify these
run: rm './braintest_or_ghostpush/tsnef(pessword)/post.sh'
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@2.0.0