| 1 | --- |
| 2 | |
| 3 | name: Differential ShellCheck |
| 4 | on: |
| 5 | push: |
| 6 | pull_request: |
| 7 | branches: [ master ] |
| 8 | |
| 9 | permissions: |
| 10 | contents: read |
| 11 | |
| 12 | jobs: |
| 13 | lint: |
| 14 | runs-on: ubuntu-latest |
| 15 | |
| 16 | permissions: |
| 17 | security-events: write |
| 18 | |
| 19 | steps: |
| 20 | - name: Repository checkout |
| 21 | uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 |
| 22 | with: |
| 23 | fetch-depth: 0 |
| 24 | |
| 25 | - id: ShellCheck |
| 26 | name: Differential ShellCheck |
| 27 | uses: redhat-plumbers-in-action/differential-shellcheck@cc6721c45a8800cc666de45493545a07a638d121 |
| 28 | with: |
| 29 | severity: error |
| 30 | token: ${{ secrets.GITHUB_TOKEN }} |
| 31 | |
| 32 | - if: ${{ always() }} |
| 33 | name: Upload artifact with ShellCheck defects in SARIF format |
| 34 | uses: actions/upload-artifact@cf8714cfeaba5687a442b9bcb85b29e23f468dfa |
| 35 | with: |
| 36 | name: Differential ShellCheck SARIF |
| 37 | path: ${{ steps.ShellCheck.outputs.sarif }} |
| 38 | |
| 39 | ... |