add GitHub Actions workflow for Bash syntax checking and enhance README with usage examples
Some checks failed
Bash Syntax Check / syntax-check (push) Failing after 36s

This commit is contained in:
Gary
2026-01-10 22:55:56 +11:00
parent 26a15aa3bc
commit 6023a0f3b4
2 changed files with 199 additions and 26 deletions

View File

@@ -0,0 +1,43 @@
name: Bash Syntax Check
on:
push:
branches:
- main
- master
- develop
paths:
- 'slackecho'
- '.gitea/workflows/syntax-check.yml'
pull_request:
branches:
- main
- master
- develop
paths:
- 'slackecho'
jobs:
syntax-check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install shellcheck
run: sudo apt-get update && sudo apt-get install -y shellcheck
- name: Run bash syntax check
run: bash -n slackecho
- name: Run shellcheck analysis
run: shellcheck slackecho
- name: Verify script is executable
run: |
if [[ -x slackecho ]]; then
echo "✓ slackecho has executable permission"
else
echo "✗ slackecho is missing executable permission"
exit 1
fi