-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add bash scripts CI workflow (#11762)
* Fix shellcheck error * Add bash scripts CI workflow * Use latest checkout action
- Loading branch information
Showing
2 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Bash Scripts | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
changes: | ||
name: detect changes | ||
runs-on: ubuntu-latest | ||
outputs: | ||
bash-scripts-src: ${{ steps.bash-scripts.outputs.src }} | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 | ||
id: bash-scripts | ||
with: | ||
filters: | | ||
src: | ||
- 'tools/bin/**' | ||
- '.github/workflows/bash-scripts.yml' | ||
shellcheck: | ||
name: ShellCheck Lint | ||
runs-on: ubuntu-latest | ||
needs: [changes] | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- name: Run ShellCheck | ||
if: needs.changes.outputs.bash-scripts-src == 'true' | ||
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # v2.0.0 | ||
with: | ||
scandir: "./tools/bin" | ||
# Consider changing this to check for warnings once all warnings are fixed. | ||
severity: error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters