-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
46 lines (42 loc) · 1.3 KB
/
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'
description: 'Execute shellcheck'
inputs:
linters:
description: 'List of all enabled linters'
required: true
ssh-key:
description: 'ssh key'
required: true
github_token:
description: 'github token'
required: true
runs:
using: "composite"
steps:
- id: check
shell: bash
run: if echo "${{ inputs.linters }}" | grep SHELLCHECK &> /dev/null; then echo "continue=true" >> "${GITHUB_OUTPUT}"; else echo "continue=false" >> "${GITHUB_OUTPUT}"; fi
# https://github.com/marketplace/actions/checkout
- uses: actions/checkout@v4
if: ${{ steps.check.outputs.continue == 'true' }}
with:
ssh-key: ${{ inputs.ssh-key }}
persist-credentials: true
lfs: true
submodules: recursive
# https://github.com/marketplace/actions/run-shellcheck-with-reviewdog
- uses: reviewdog/action-shellcheck@v1
if: ${{ steps.check.outputs.continue == 'true' }}
with:
exclude: "./git/*"
fail_on_error: true
filter_mode: nofilter
github_token: ${{ inputs.github_token }}
level: info
path: "."
pattern: "*.sh"
reporter: github-pr-review
# reviewdog_flags:
# https://github.com/koalaman/shellcheck
shellcheck_flags: --external-sources