Add shellcheck workflow

This commit is contained in:
ZoopaMario 2024-12-28 20:42:05 +01:00
parent 4d6c2ce52a
commit d6990724b1

View file

@ -24,9 +24,11 @@ jobs:
- name: Checkout Code - name: Checkout Code
uses: https://code.forgejo.org/actions/checkout@v4 uses: https://code.forgejo.org/actions/checkout@v4
<<<<<<< HEAD
- name: List Checked Out Files - name: List Checked Out Files
run: ls -al /workspace/ZoopaMario/backup-automation run: ls -al /workspace/ZoopaMario/backup-automation
>>>>>>> 20dd94e (Add shellcheck workflow)
- name: Install ShellCheck - name: Install ShellCheck
run: | run: |
apt-get update && apt-get install -y shellcheck apt-get update && apt-get install -y shellcheck
@ -40,19 +42,6 @@ jobs:
- name: Debug Commit Message - name: Debug Commit Message
run: git log -1 --pretty=%B run: git log -1 --pretty=%B
- name: Lint Bash Scripts
run: |
echo "Linting Bash scripts..."
find . -name '*.sh' -print0 | xargs -0 shellcheck
- name: Check Commit Messages
run: |
echo "Checking commit message format..."
if ! git log -1 --pretty=%B | grep -Eq '^(feat|fix|chore|docs|style|refactor|test|perf):'; then
echo "Commit message does not follow the conventional format: <type>: <subject>"
exit 1
fi
- name: Show Environment Variables - name: Show Environment Variables
run: env run: env