update github action

This commit is contained in:
2024-06-27 22:36:10 +02:00
parent 15aec007e3
commit 1ab0ae86ef

View File

@@ -1,20 +1,27 @@
name: Bash Script Tests
name: ShellCheck
on: [push, pull_request]
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
shellcheck:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Bash
run: |
sudo apt update
sudo apt install -y bash
- name: Install ShellCheck
run: sudo apt-get install -y shellcheck
- name: Run Bash script tests
run: |
find . -type f -name "*.sh" -exec bash -n {} \;
- name: Run ShellCheck
run: shellcheck sh_scripts/*.sh
- name: Report results
if: failure()
run: exit 1