63 lines
1.7 KiB
YAML
63 lines
1.7 KiB
YAML
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@v5.0.0
|
|
|
|
- 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[@]}"
|