Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ShellCheck Action and Add differential PyLint Action #1290

Merged
merged 2 commits into from
Jan 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 41 additions & 3 deletions .github/workflows/linters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,54 @@ defaults:
shell: bash -o pipefail {0}

jobs:
lint:
lint-shell:
runs-on: ubuntu-latest

permissions:
security-events: write

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Lint shell scripts
uses: redhat-plumbers-in-action/differential-shellcheck@v3
- id: ShellCheck
name: Lint shell scripts
uses: redhat-plumbers-in-action/differential-shellcheck@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

- if: ${{ always() }}
name: Upload artifact with ShellCheck defects in SARIF format
uses: actions/upload-artifact@v3
with:
name: Differential ShellCheck SARIF
path: ${{ steps.ShellCheck.outputs.sarif }}

lint-python:
runs-on: ubuntu-latest

permissions:
security-events: write

steps:
- name: Checkout code
uses: actions/checkout@v3

- id: VCS_Diff_Lint
name: Lint python scripts
uses: fedora-copr/vcs-diff-lint-action@v1

- if: ${{ always() }}
name: Upload artifact with detected defects in SARIF format
uses: actions/upload-artifact@v3
with:
name: VCS Diff Lint SARIF
path: ${{ steps.VCS_Diff_Lint.outputs.sarif }}

- if: ${{ failure() }}
name: Upload SARIF to GitHub using github/codeql-action/upload-sarif
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{ steps.VCS_Diff_Lint.outputs.sarif }}