mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-22 05:12:27 +00:00
bashisms.yml now only checks modified files (it should at least) (#515)
This commit is contained in:
parent
596f278993
commit
fb2b6fc64f
21
.github/workflows/bashisms.yml
vendored
21
.github/workflows/bashisms.yml
vendored
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user