mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-12-25 04:49:44 +00:00
fix(ci): bashisms.yml
. again. will work all the time this time i swear. (#715)
* workflow fixed * added a debug echo
This commit is contained in:
parent
d3a801d49b
commit
9ffa35249b
24
.github/workflows/bashisms.yml
vendored
24
.github/workflows/bashisms.yml
vendored
|
@ -19,17 +19,27 @@ jobs:
|
|||
id: get_sh_files
|
||||
run: |
|
||||
sh_files=$(git diff --name-only origin/${{ github.base_ref }} HEAD core/tabs | grep '\.sh$' || true)
|
||||
echo "::set-output name=sh_files::$sh_files"
|
||||
if [ -n "$sh_files" ]; then
|
||||
echo "$sh_files" > changed_files
|
||||
echo "changed=1" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "changed=0" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Install devscripts
|
||||
if: steps.get_sh_files.outputs.sh_files != ''
|
||||
if: steps.get_sh_files.outputs.changed == 1
|
||||
run: sudo apt-get update && sudo apt-get install devscripts
|
||||
|
||||
- name: Check for bashisms
|
||||
if: steps.get_sh_files.outputs.sh_files != ''
|
||||
if: steps.get_sh_files.outputs.changed == 1
|
||||
run: |
|
||||
for file in ${{ steps.get_sh_files.outputs.sh_files }}; do
|
||||
if [[ -f "$file" ]]; then
|
||||
checkbashisms "$file"
|
||||
fi
|
||||
echo "Running for:\n$(cat changed_files)\n"
|
||||
for file in $(cat changed_files); do
|
||||
if [[ -f "$file" ]]; then
|
||||
checkbashisms "$file"
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Remove the created file
|
||||
if: steps.get_sh_files.outputs.changed == 1
|
||||
run: rm changed_files
|
||||
|
|
Loading…
Reference in New Issue
Block a user