-
-
Notifications
You must be signed in to change notification settings - Fork 251
46 lines (43 loc) · 1.48 KB
/
shellcheck-action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: ShellCheck
# Trigger the workflow on push or pull request
on:
push:
paths:
- '**.bash'
- '**.sh'
- '!tests/test.bash'
- '.github/workflows/shellcheck-action.yml'
pull_request:
paths:
- '**.bash'
- '**.sh'
- '!tests/test.bash'
- '.github/workflows/shellcheck-action.yml'
jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup environment
run: sudo -E bash -c set
- name: "ShellCheck openhabian-setup.sh"
run: |
echo "ShellCheck openhabian-setup.sh..."
if shellcheck -x -s bash openhabian-setup.sh; then echo "OK"; else echo "FAILED"; exit 1; fi
shell: bash
- name: "ShellCheck functions/*.bash"
run: |
echo "ShellCheck functions/*.bash..."
if shellcheck -x -s bash functions/*.bash; then echo "OK"; else echo "FAILED"; exit 1; fi
shell: bash
- name: "ShellCheck build-image/*.bash"
run: |
echo "ShellCheck build-image/*.bash..."
if shellcheck -x -s bash build-image/*.bash; then echo "OK"; else echo "FAILED"; exit 1; fi
shell: bash
- name: "ShellCheck build.bash and ci-setup.bash"
run: |
echo "ShellCheck build.bash and ci-setup.bash..."
if shellcheck -x -s bash build.bash tests/ci-setup.bash; then echo "OK"; else echo "FAILED"; exit 1; fi
shell: bash