This commit is contained in:
Adam Perkowski 2024-09-22 19:37:01 +02:00 committed by GitHub
parent 8c5b5702bd
commit 83a61a093f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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