mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-05 13:15:21 +00:00
39 lines
943 B
YAML
39 lines
943 B
YAML
name: Check for bashisms
|
|
|
|
on:
|
|
# push:
|
|
# paths:
|
|
# - core/tabs/**
|
|
# branches: [ "main" ]
|
|
pull_request:
|
|
paths:
|
|
- core/tabs/**
|
|
merge_group:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
check-bashisms:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- 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
|
|
if: env.sh_files != ''
|
|
run: sudo apt-get update && sudo apt-get install devscripts
|
|
|
|
- name: Check for bashisms
|
|
if: env.sh_files != ''
|
|
run: |
|
|
for file in ${{ env.sh_files }}; do
|
|
if [[ -f "$file" ]]; then
|
|
checkbashisms "$file"
|
|
fi
|
|
done
|