-
Notifications
You must be signed in to change notification settings - Fork 469
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dd53a47
commit e9e6ad0
Showing
1 changed file
with
30 additions
and
0 deletions.
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,30 @@ | ||
name: π GA-Misc - ShellCheck | ||
|
||
on: | ||
pull_request: | ||
paths-ignore: | ||
- '.github/**' | ||
|
||
types: [opened, reopened, synchronize] | ||
|
||
jobs: | ||
GA-Misc-Check-ShellCheck: | ||
name: π Run ShellCheck | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: π§ Check out repository code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: π Get all changed SHELL files | ||
id: changed-file-list | ||
run: | | ||
echo "changed_files=$(git diff --name-only --diff-filter=ACMRT --merge-base origin/master | grep -E "\.sh$" | xargs)" >> $GITHUB_OUTPUT | ||
- name: π§ββοΈ Run Format checks | ||
if: steps.changed-file-list.outputs.changed_files != '' | ||
run: | | ||
npm i -g shellcheck | ||
npx shellcheck ${{ steps.changed-file-list.outputs.changed_files }} |