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
Some checks failed
Bash Syntax Check / syntax-check (push) Failing after 36s
This commit is contained in:
43
.gitea/workflows/syntax-check.yml
Normal file
43
.gitea/workflows/syntax-check.yml
Normal 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
|
||||
Reference in New Issue
Block a user