From 0378410187c56fcf13e4beebc5d7989dc98ff454 Mon Sep 17 00:00:00 2001 From: Adam Perkowski Date: Fri, 20 Sep 2024 05:59:47 +0200 Subject: [PATCH] Fixed the spellcheck workflow (#557) * Shellcheck.yml rewritten * dir * dir --- .github/workflows/shellcheck.yml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index e560aea5..e91ad941 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -11,9 +11,20 @@ jobs: name: Shellcheck runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Run ShellCheck - uses: ludeeus/action-shellcheck@master - with: - scandir: 'core/tabs' - severity: error \ No newline at end of file + - uses: actions/checkout@v4 + - run: git fetch origin ${{ github.base_ref }} + + - name: Download and set up shellcheck + run : | + wget https://github.com/koalaman/shellcheck/releases/download/v0.10.0/shellcheck-v0.10.0.linux.x86_64.tar.xz + tar -xf shellcheck-v0.10.0.linux.x86_64.tar.xz + cd shellcheck-v0.10.0 + chmod +x shellcheck + + - name: Run shellcheck + run: | + for file in $(git diff --name-only origin/${{ github.base_ref }} HEAD core/tabs); do + if [[ "$file" == *.sh ]] && [[ -f "$file" ]]; then + ./shellcheck-v0.10.0/shellcheck -S error "$file" + fi + done