forked from ham-radio-software/D-Rats
-
Notifications
You must be signed in to change notification settings - Fork 1
31 lines (29 loc) · 909 Bytes
/
Copy pathshellcheck.yml
File metadata and controls
31 lines (29 loc) · 909 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
---
name: ShellCheck
# Always run on Pull Requests
on: # yamllint disable-line rule:truthy
pull_request:
jobs:
shellcheck:
name: Run ShellCheck
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Install core packages
run: |
./tests/install_shellcheck_ubuntu.sh
- name: Pull via git
run: |
git fetch origin ${{ github.event.pull_request.base.sha }}
- name: Show git diff
run: |
git diff --name-only ${{ github.event.pull_request.base.sha }}
- name: Do the ShellCheck
run: |
base_sha="${{ github.event.pull_request.base.sha }}"
changed="$(git diff --name-only $base_sha)"
export CHANGED_FILES="$changed"
./tests/pre-commit_d/shellcheck_check.sh