2024-09-18 19:56:46 +01:00
|
|
|
name: Check for bashisms
|
|
|
|
|
|
|
|
on:
|
2024-09-19 14:15:49 +01:00
|
|
|
# push:
|
|
|
|
# paths:
|
2024-09-20 01:09:53 +01:00
|
|
|
# - core/tabs/**
|
2024-09-19 14:15:49 +01:00
|
|
|
# branches: [ "main" ]
|
2024-09-18 19:56:46 +01:00
|
|
|
pull_request:
|
|
|
|
paths:
|
2024-09-20 01:09:53 +01:00
|
|
|
- core/tabs/**
|
2024-09-18 19:56:46 +01:00
|
|
|
merge_group:
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
check-bashisms:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2024-09-19 14:15:49 +01:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- run: git fetch origin ${{ github.base_ref }}
|
2024-09-18 19:56:46 +01:00
|
|
|
|
|
|
|
- name: Install devscripts
|
2024-09-19 01:18:22 +01:00
|
|
|
run: sudo apt-get update && sudo apt-get install devscripts
|
2024-09-18 19:56:46 +01:00
|
|
|
|
2024-09-19 14:15:49 +01:00
|
|
|
- name: Check for bashisms in changed files
|
|
|
|
run: |
|
2024-09-20 01:09:53 +01:00
|
|
|
for file in $(git diff --name-only origin/${{ github.base_ref }} HEAD core/tabs); do
|
2024-09-19 14:15:49 +01:00
|
|
|
if [[ "$file" == *.sh ]]; then
|
|
|
|
checkbashisms "$file"
|
|
|
|
fi
|
|
|
|
done
|