ci(lint): add shell linter - Differential ShellCheck
It performs differential ShellCheck scans and reports results directly on GitHub. documentation: https://github.com/redhat-plumbers-in-action/differential-shellcheck Signed-off-by: Jan Macku <jamacku@redhat.com>
This commit is contained in:
parent
99469c4a9b
commit
4f5d628139
1 changed files with 36 additions and 0 deletions
36
.github/workflows/differential-shellcheck.yml
vendored
Normal file
36
.github/workflows/differential-shellcheck.yml
vendored
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
name: Differential ShellCheck
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
security-events: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Repository checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
# Differential ShellCheck requires full git history
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- id: ShellCheck
|
||||||
|
name: Differential ShellCheck
|
||||||
|
uses: redhat-plumbers-in-action/differential-shellcheck@v5
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- if: always()
|
||||||
|
name: Upload artifact with ShellCheck defects in SARIF format
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: Differential ShellCheck SARIF
|
||||||
|
path: ${{ steps.ShellCheck.outputs.sarif }}
|
Loading…
Reference in a new issue