mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-22 05:12:27 +00:00
Changed the CI to only run when .sh
files are changed (#588)
This commit is contained in:
parent
6c877b15fa
commit
3c8adcf370
13
.github/workflows/bashisms.yml
vendored
13
.github/workflows/bashisms.yml
vendored
|
@ -19,13 +19,20 @@ jobs:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- run: git fetch origin ${{ github.base_ref }}
|
- run: git fetch origin ${{ github.base_ref }}
|
||||||
|
|
||||||
|
- name: Get a list of changed script 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
|
||||||
|
|
||||||
- name: Install devscripts
|
- name: Install devscripts
|
||||||
|
if: env.sh_files != ''
|
||||||
run: sudo apt-get update && sudo apt-get install devscripts
|
run: sudo apt-get update && sudo apt-get install devscripts
|
||||||
|
|
||||||
- name: Check for bashisms in changed files
|
- name: Check for bashisms
|
||||||
|
if: env.sh_files != ''
|
||||||
run: |
|
run: |
|
||||||
for file in $(git diff --name-only origin/${{ github.base_ref }} HEAD core/tabs); do
|
for file in ${{ env.sh_files }}; do
|
||||||
if [[ "$file" == *.sh ]] && [[ -f "$file" ]]; then
|
if [[ -f "$file" ]]; then
|
||||||
checkbashisms "$file"
|
checkbashisms "$file"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue
Block a user