# Description: Runs shellcheck on tracked shell scripts when they change
name: 'CI: Shell Validation'

on:
  push:
    branches:
      - main
    paths:
      - '**/*.sh'
  pull_request:
    paths:
      - '**/*.sh'

jobs:
  shell-lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6

      - name: Install shellcheck
        run: |
          sudo apt-get update
          sudo apt-get install -y shellcheck

      - name: Run shellcheck
        run: bash ./scripts/cicd/check-shell.sh
