2024-09-19 20:03:29 +01:00
|
|
|
name: ShellCheck
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths:
|
2024-09-20 01:09:53 +01:00
|
|
|
- 'core/tabs/**/*.sh'
|
2024-09-19 20:04:25 +01:00
|
|
|
workflow_dispatch:
|
2024-09-19 20:03:29 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
shellcheck:
|
|
|
|
name: Shellcheck
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-09-20 04:59:47 +01:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- run: git fetch origin ${{ github.base_ref }}
|
|
|
|
|
|
|
|
- name: Download and set up shellcheck
|
|
|
|
run : |
|
|
|
|
wget https://github.com/koalaman/shellcheck/releases/download/v0.10.0/shellcheck-v0.10.0.linux.x86_64.tar.xz
|
|
|
|
tar -xf shellcheck-v0.10.0.linux.x86_64.tar.xz
|
|
|
|
cd shellcheck-v0.10.0
|
|
|
|
chmod +x shellcheck
|
|
|
|
|
|
|
|
- name: Run shellcheck
|
|
|
|
run: |
|
|
|
|
for file in $(git diff --name-only origin/${{ github.base_ref }} HEAD core/tabs); do
|
|
|
|
if [[ "$file" == *.sh ]] && [[ -f "$file" ]]; then
|
|
|
|
./shellcheck-v0.10.0/shellcheck -S error "$file"
|
|
|
|
fi
|
|
|
|
done
|