linutil/.github/workflows/bashisms.yml
Nyx 6a1df3c3a9
Fix (#556)
Co-authored-by: nnyyxxxx <nnyyxxxx@users.noreply.github.com>
2024-09-19 23:00:11 -05:00

32 lines
744 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: Install devscripts
run: sudo apt-get update && sudo apt-get install devscripts
- name: Check for bashisms in changed files
run: |
for file in $(git diff --name-only origin/${{ github.base_ref }} HEAD core/tabs); do
if [[ "$file" == *.sh ]] && [[ -f "$file" ]]; then
checkbashisms "$file"
fi
done