Repository navigation
62 lines (56 loc) · 1.71 KB
/
Copy pathshellcheck.yml
File metadata and controls
62 lines (56 loc) · 1.71 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Differential ShellCheck
on:
workflow_dispatch:
push:
branches:
- main
- 'rc/**'
paths:
- 'build.sh'
- 'install.sh'
- 'tachyon/files/etc/init.d/**'
- 'tachyon/files/usr/lib/cgi-bin/**'
- 'tachyon/files/etc/hotplug.d/iface/**'
- 'luci-app-tachyon/root/etc/uci-defaults/**'
- 'tests/**/*.sh'
- '.github/workflows/shellcheck.yml'
pull_request:
branches:
- main
- 'rc/**'
paths:
- 'build.sh'
- 'install.sh'
- 'tachyon/files/etc/init.d/**'
- 'tachyon/files/usr/lib/cgi-bin/**'
- 'tachyon/files/etc/hotplug.d/iface/**'
- 'luci-app-tachyon/root/etc/uci-defaults/**'
- 'tests/**/*.sh'
- '.github/workflows/shellcheck.yml'
permissions:
contents: read
jobs:
shellcheck:
name: Differential ShellCheck
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install ShellCheck
run: |
sudo rm -f /etc/apt/sources.list.d/google-chrome.list
sudo apt-get update
sudo apt-get install -y shellcheck
- name: ShellCheck
shell: bash
run: |
mapfile -d '' scripts < <(
find . -type f \
\( -name '*.sh' -o -path './build.sh' -o -path './install.sh' \
-o -path './tachyon/files/etc/init.d/*' \
-o -path './tachyon/files/usr/lib/cgi-bin/*' \
-o -path './tachyon/files/etc/hotplug.d/iface/*' \
-o -path './luci-app-tachyon/root/etc/uci-defaults/*' \) \
-print0
)
shellcheck --severity=error "${scripts[@]}"