-
Notifications
You must be signed in to change notification settings - Fork 9
64 lines (54 loc) · 1.87 KB
/
differential-shellcheck.yml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
name: Differential ShellCheck
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
merge_group:
types: [ checks_requested ]
permissions:
contents: read
jobs:
lint:
name: Differential ShellCheck - test current changes
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
# Let's have this log of GitHub context for further development and debugging
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Repository checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
# Replace docker://ghcr.io/redhat-plumbers-in-action/differential-shellcheck:vX.Y.Z with Dockerfile
- name: Edit an action.yml file to test current changes
run: |
sed -i "s/docker:\/\/ghcr\.io\/redhat-plumbers-in-action\/differential-shellcheck.*/Dockerfile/g" action.yml
- name: Differential ShellCheck - test current changes
id: ShellCheck
uses: ./
with:
exclude-path: |
test/**
src/**.{zsh,osh}
display-engine: sarif-fmt
token: ${{ secrets.GITHUB_TOKEN }}
- if: always()
name: Upload artifact with defects in SARIF format
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: Differential ShellCheck SARIF
path: ${{ steps.ShellCheck.outputs.sarif }}
retention-days: 7
- if: always()
name: Upload artifact with defects in XHTML format
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: Differential ShellCheck HTML
path: ${{ steps.ShellCheck.outputs.html }}
retention-days: 7