diff --git a/.github/workflows/lint-checks.yaml b/.github/workflows/lint-checks.yaml index 87333eb89..68b304540 100644 --- a/.github/workflows/lint-checks.yaml +++ b/.github/workflows/lint-checks.yaml @@ -29,23 +29,24 @@ jobs: shellcheck: runs-on: ubuntu-latest + container: koalaman/shellcheck-alpine@latest steps: - name: â†Šī¸ Checkout uses: actions/checkout@v2 + + - name: Get changed files + id: changed_files + uses: jitterbit/get-changed-files@v1 - - name: 📂 Detect chanced files - id: filter - uses: dorny/paths-filter@v2.9.0 - with: - filters: | - - '**/*.sh' - - '**/cont-init.d/*' - - '**/services.d/*' - name: 🔎 Run ShellCheck - if: steps.filter.outputs.shell == 'true' - uses: ludeeus/action-shellcheck@1.1.0 - with: - additional_files: ${{ steps.filter.outputs.shell_files }} + run: | + for files in ${{ steps.changed_files.outputs.all }}; do + if [[ "$(basename ${files})" == *".sh* ]]; then + echo "Spellcheck ${{ steps.changed_files.outputs.all }}" + hadolint "${{ steps.changed_files.outputs.all }}" + fi + done + markdownlint: runs-on: ubuntu-latest