Add bash linter workflow
Some checks failed
Check Commit Messages / check-commit-message (push) Failing after 4m23s
Some checks failed
Check Commit Messages / check-commit-message (push) Failing after 4m23s
Using the checkout@v4 action on each push and pull request
This commit is contained in:
parent
70fae4bc24
commit
7581374e19
31
.forgejo/workflows/lint-bash.yml
Normal file
31
.forgejo/workflows/lint-bash.yml
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
name: Lint Bash Scripts
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- '**/*.sh'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- '**/*.sh'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint-bash:
|
||||||
|
runs-on: docker
|
||||||
|
container:
|
||||||
|
image: node:16-bullseye # Node.js pre-installed, based on Debian
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: https://code.forgejo.org/actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0 # Fetch the entire history to avoid REST API reliance
|
||||||
|
|
||||||
|
- name: Install ShellCheck
|
||||||
|
run: |
|
||||||
|
apt-get update && apt-get install -y shellcheck
|
||||||
|
|
||||||
|
- name: Lint Bash Scripts
|
||||||
|
run: |
|
||||||
|
echo "Linting Bash scripts..."
|
||||||
|
find . -name '*.sh' -print0 | xargs -0 shellcheck
|
||||||
|
|
Loading…
Reference in a new issue