mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
actions: Run YAML formatter over all workflow files
This commit is contained in:
50
.github/workflows/pr-lint-scripts.yml
vendored
50
.github/workflows/pr-lint-scripts.yml
vendored
@@ -17,45 +17,43 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
Shellcheck:
|
||||
|
||||
name: Shell script analysis
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.repository_owner == 'Armbian' }}
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 2
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v44
|
||||
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v44
|
||||
- name: List all changed files
|
||||
run: |
|
||||
|
||||
- name: List all changed files
|
||||
run: |
|
||||
# Use framework internal mechanism for checking `lib` and `extensions` code only one file is passed,
|
||||
# and source's are followed, thus the whole project is "understood" by shellcheck.
|
||||
# For example, when checking individual files, one variable might be thought "unused" because it
|
||||
# is only used in another file, which does not happen when done properly.
|
||||
|
||||
# Use framework internal mechanism for checking `lib` and `extensions` code only one file is passed,
|
||||
# and source's are followed, thus the whole project is "understood" by shellcheck.
|
||||
# For example, when checking individual files, one variable might be thought "unused" because it
|
||||
# is only used in another file, which does not happen when done properly.
|
||||
bash lib/tools/shellcheck.sh
|
||||
|
||||
bash lib/tools/shellcheck.sh
|
||||
ret=0
|
||||
|
||||
ret=0
|
||||
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
|
||||
|
||||
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
|
||||
if [[ ! "${file}" =~ lib/|extensions/|.py|.service|.rules|.network|.netdev ]]; then
|
||||
if grep -qE "^#\!/.*bash" $file; then
|
||||
|
||||
if [[ ! "${file}" =~ lib/|extensions/|.py|.service|.rules|.network|.netdev ]]; then
|
||||
if grep -qE "^#\!/.*bash" $file; then
|
||||
shellcheck --severity=error $file || ret=$?
|
||||
|
||||
shellcheck --severity=error $file || ret=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
done
|
||||
|
||||
exit $ret
|
||||
exit $ret
|
||||
|
||||
Reference in New Issue
Block a user