-
-
Notifications
You must be signed in to change notification settings - Fork 6
73 lines (64 loc) · 2.07 KB
/
shellcheck.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: shellcheck
on:
push:
branches:
- main
pull_request:
jobs:
shellcheck:
name: shellcheck with reviewdog
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: shfmt suggest
uses: reviewdog/[email protected]
with:
fail_on_error: true
shfmt_flags: '-ci'
- name: setup shellcheck
run: |
scversion="latest"
wget -qO- "https://github.com/koalaman/shellcheck/releases/download/${scversion?}/shellcheck-${scversion?}.linux.x86_64.tar.xz" | tar -xJv
sudo cp "shellcheck-${scversion}/shellcheck" /usr/local/bin/
rm -rf "shellcheck-${scversion}"
- name: patch shellcheck suggest
run: |
shellcheck -f diff "$(find . -name 'compose-cd' -or -name '*.sh' -type f)" | patch -p1
- name: shellcheck suggest
if: ${{ github.event_name }} == 'pull_request'
uses: reviewdog/[email protected]
with:
tool_name: shellcheck
- name: shellcheck(github-pr-review)
if: ${{ github.event_name }} == 'pull_request'
uses: reviewdog/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
filter_mode: added
fail_on_error: true
reporter: github-pr-check
pattern: |
*.sh
compose-cd
- name: shellcheck(github-pr-check)
if: ${{ github.event_name }} == 'pull_request'
uses: reviewdog/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
filter_mode: nofilter
fail_on_error: true
reporter: github-pr-check
pattern: |
*.sh
compose-cd
- name: shellcheck(github-check)
uses: reviewdog/[email protected]
if: github.event_name == 'push'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
filter_mode: nofilter
fail_on_error: true
reporter: github-check
pattern: |
*.sh
compose-cd