Skip to content

Commit

Permalink
feat(ci): add shellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
HarryVasanth authored Nov 23, 2024
1 parent dd53a47 commit e9e6ad0
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ga-misc-check-shellcheck.yml
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 }}

0 comments on commit e9e6ad0

Please sign in to comment.