-
Notifications
You must be signed in to change notification settings - Fork 56
37 lines (31 loc) · 905 Bytes
/
aomp-shell.yml
File metadata and controls
37 lines (31 loc) · 905 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: AOMP shellcheck lint
on:
pull_request:
jobs:
aomp-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 2
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323
with:
separator: ' '
skip_initial_fetch: true
base_sha: 'HEAD~1'
sha: 'HEAD'
- name: Echo changed files
run: |
echo "Changed files: ${{ steps.changed-files.outputs.all_changed_files }}"
- name: Run shellcheck
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
if [[ $file == *.sh ]]; then
echo "Running shellcheck on $file"
shellcheck -x "$file"
fi
done
shell: bash {0}