fix(ci): bashisms.yml. again. will work all the time this time i swear. (#715)

* workflow fixed

* added a debug echo
This commit is contained in:
Adam Perkowski 2024-10-02 17:43:04 +02:00 committed by GitHub
parent d3a801d49b
commit 9ffa35249b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,17 +19,27 @@ jobs:
id: get_sh_files id: get_sh_files
run: | run: |
sh_files=$(git diff --name-only origin/${{ github.base_ref }} HEAD core/tabs | grep '\.sh$' || true) sh_files=$(git diff --name-only origin/${{ github.base_ref }} HEAD core/tabs | grep '\.sh$' || true)
echo "::set-output name=sh_files::$sh_files" if [ -n "$sh_files" ]; then
echo "$sh_files" > changed_files
echo "changed=1" >> $GITHUB_OUTPUT
else
echo "changed=0" >> $GITHUB_OUTPUT
fi
- name: Install devscripts - name: Install devscripts
if: steps.get_sh_files.outputs.sh_files != '' if: steps.get_sh_files.outputs.changed == 1
run: sudo apt-get update && sudo apt-get install devscripts run: sudo apt-get update && sudo apt-get install devscripts
- name: Check for bashisms - name: Check for bashisms
if: steps.get_sh_files.outputs.sh_files != '' if: steps.get_sh_files.outputs.changed == 1
run: | run: |
for file in ${{ steps.get_sh_files.outputs.sh_files }}; do echo "Running for:\n$(cat changed_files)\n"
if [[ -f "$file" ]]; then for file in $(cat changed_files); do
checkbashisms "$file" if [[ -f "$file" ]]; then
fi checkbashisms "$file"
fi
done done
- name: Remove the created file
if: steps.get_sh_files.outputs.changed == 1
run: rm changed_files