-
Notifications
You must be signed in to change notification settings - Fork 5k
40 lines (36 loc) · 1.08 KB
/
shellcheck.yaml
File metadata and controls
40 lines (36 loc) · 1.08 KB
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
38
39
40
---
name: ShellCheck Scripts
permissions:
contents: read
on:
pull_request:
types: ['opened', 'synchronize']
paths:
- '.github/workflows/shellcheck.yaml'
- 'scripts/**'
concurrency:
group: 'shellcheck-${{ github.head_ref }}'
cancel-in-progress: true
jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Run ShellCheck
run: make shellcheck
- name: Guidance on failure
if: failure()
run: |
echo "::error::ShellCheck failed."
echo ""
echo "Run 'make shellcheck' locally to check shell scripts for issues."
echo "ShellCheck identifies common shell scripting pitfalls and bugs."
echo "See https://www.shellcheck.net/wiki/ for explanations of each warning code."
save-artifacts-on-fail:
needs: shellcheck
if: ${{ failure() }}
uses: ./.github/workflows/save-artifacts.yaml
comment-on-fail:
needs: shellcheck
if: ${{ failure() }}
uses: ./.github/workflows/comment-failure.yaml