Skip to content

Commit 96866b0

Browse files
Merge pull request #116 from puppetlabs/CAT-2094-shellcheck_in_module_ci
(CAT-2094) Add shellcheck to module_ci workflow
2 parents 88e2fcb + dcee054 commit 96866b0

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/module_ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ on:
1414
required: false
1515
default: ''
1616
type: "string"
17+
run_shellcheck:
18+
description: "Run shellcheck on all bash files"
19+
required: false
20+
default: false
21+
type: "boolean"
1722

1823

1924
jobs:
@@ -81,6 +86,15 @@ jobs:
8186
bundle env
8287
echo ::endgroup::
8388
89+
- name: "shellcheck"
90+
uses: reviewdog/action-shellcheck@v1
91+
if: |
92+
inputs.run_shellcheck &&
93+
inputs.runs_on == 'ubuntu-latest' &&
94+
matrix.ruby_version == '3.2'
95+
with:
96+
check_all_files_with_shebangs: "true"
97+
8498
- name: "Run Static & Syntax Tests"
8599
run: |
86100
bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop

0 commit comments

Comments
 (0)