Skip to content

Commit fb2b6fc

Browse files
bashisms.yml now only checks modified files (it should at least) (ChrisTitusTech#515)
1 parent 596f278 commit fb2b6fc

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

.github/workflows/bashisms.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: Check for bashisms
22

33
on:
4-
push:
5-
paths:
6-
- tabs/**
7-
branches: [ "main" ]
4+
# push:
5+
# paths:
6+
# - tabs/**
7+
# branches: [ "main" ]
88
pull_request:
99
paths:
1010
- tabs/**
@@ -16,11 +16,16 @@ jobs:
1616
runs-on: ubuntu-latest
1717

1818
steps:
19-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v4
20+
- run: git fetch origin ${{ github.base_ref }}
2021

2122
- name: Install devscripts
2223
run: sudo apt-get update && sudo apt-get install devscripts
2324

24-
- name: Check for bashisms
25-
working-directory: tabs
26-
run: find . -name '*.sh' | xargs -P 4 -n 1 checkbashisms
25+
- name: Check for bashisms in changed files
26+
run: |
27+
for file in $(git diff --name-only origin/${{ github.base_ref }} HEAD tabs); do
28+
if [[ "$file" == *.sh ]]; then
29+
checkbashisms "$file"
30+
fi
31+
done

0 commit comments

Comments
 (0)