From 83a61a093fb74d21335e34aac51a326066589c6c Mon Sep 17 00:00:00 2001 From: Adam Perkowski Date: Sun, 22 Sep 2024 19:37:01 +0200 Subject: [PATCH] Fixed (#623) --- .github/workflows/bashisms.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/bashisms.yml b/.github/workflows/bashisms.yml index 44b4a191..7226bb5c 100644 --- a/.github/workflows/bashisms.yml +++ b/.github/workflows/bashisms.yml @@ -1,10 +1,6 @@ name: Check for bashisms on: - # push: - # paths: - # - core/tabs/** - # branches: [ "main" ] pull_request: paths: - core/tabs/** @@ -20,18 +16,19 @@ jobs: - run: git fetch origin ${{ github.base_ref }} - name: Get a list of changed script files - run : | + id: get_sh_files + run: | sh_files=$(git diff --name-only origin/${{ github.base_ref }} HEAD core/tabs | grep '\.sh$' || true) - echo "sh_files=$sh_files" >> $GITHUB_ENV + echo "::set-output name=sh_files::$sh_files" - name: Install devscripts - if: env.sh_files != '' + if: steps.get_sh_files.outputs.sh_files != '' run: sudo apt-get update && sudo apt-get install devscripts - name: Check for bashisms - if: env.sh_files != '' + if: steps.get_sh_files.outputs.sh_files != '' run: | - for file in ${{ env.sh_files }}; do + for file in ${{ steps.get_sh_files.outputs.sh_files }}; do if [[ -f "$file" ]]; then checkbashisms "$file" fi