bashisms.yml now only checks modified files (it should at least) (#515)

This commit is contained in:
Adam Perkowski 2024-09-19 15:15:49 +02:00 committed by GitHub
parent 596f278993
commit fb2b6fc64f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,10 +1,10 @@
name: Check for bashisms name: Check for bashisms
on: on:
push: # push:
paths: # paths:
- tabs/** # - tabs/**
branches: [ "main" ] # branches: [ "main" ]
pull_request: pull_request:
paths: paths:
- tabs/** - tabs/**
@ -16,11 +16,16 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- run: git fetch origin ${{ github.base_ref }}
- name: Install devscripts - name: Install devscripts
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 in changed files
working-directory: tabs run: |
run: find . -name '*.sh' | xargs -P 4 -n 1 checkbashisms for file in $(git diff --name-only origin/${{ github.base_ref }} HEAD tabs); do
if [[ "$file" == *.sh ]]; then
checkbashisms "$file"
fi
done