Files
dependabot[bot] 7503301ce9 chore(deps): bump tj-actions/changed-files from 45 to 47 (#1329)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 45 to 47.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v45...v47)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-version: '47'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Chris Titus <contact@christitus.com>
2026-07-17 14:04:08 -05:00

51 lines
1.3 KiB
YAML

name: Check for bashisms
permissions:
contents: read
on:
pull_request:
paths:
- 'core/tabs/**/*.sh'
merge_group:
workflow_dispatch:
jobs:
check-bashisms:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- run: git fetch origin ${{ github.base_ref }}
- name: Install devscripts
run: sudo apt-get update && sudo apt-get install -y devscripts
- name: Get changed .sh files (PR only)
id: changed-sh-files
if: github.event_name == 'pull_request'
uses: tj-actions/changed-files@v47
with:
files: '**/*.sh'
- name: Get all .sh files (if workflow dispatched)
id: sh-files
if: github.event_name != 'pull_request'
run: |
files=$(find . -type f -name "*.sh" | tr '\n' ' ')
echo "files=${files:-none}" >> $GITHUB_ENV
- name: Set FILES for bashism check
id: set-files
run: |
if [[ "${{ steps.changed-sh-files.outputs.any_changed }}" == 'true' ]]; then
echo "FILES=${{ steps.changed-sh-files.outputs.all_changed_files }}" >> $GITHUB_ENV
else
echo "FILES=${{ env.files }}" >> $GITHUB_ENV
fi
- name: Check for bashisms
run: |
IFS=' ' read -r -a file_array <<< "$FILES"
checkbashisms "${file_array[@]}"