mirror of
https://github.com/MrUnknownDE/linux-script.git
synced 2026-04-06 00:32:03 +02:00
update github action
This commit is contained in:
27
.github/workflows/bash_tester.yml
vendored
27
.github/workflows/bash_tester.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user