Skip to content

Commit

Permalink
Optimize GitHub Actions workflow by checking if clippy-sarif and sari…
Browse files Browse the repository at this point in the history
…f-fmt are already installed before installing them
  • Loading branch information
niStee committed Jul 27, 2024
1 parent 132a49a commit 9a53874
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/check_security_vulnerability.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ jobs:
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install required cargo
run: cargo install clippy-sarif sarif-fmt
run: |
if ! command -v clippy-sarif &> /dev/null || ! command -v sarif-fmt &> /dev/null; then
cargo install clippy-sarif sarif-fmt
else
echo "clippy-sarif and sarif-fmt are already installed"
- name: Run rust-clippy
run: |
cargo clippy --all-features --message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
Expand Down

0 comments on commit 9a53874

Please sign in to comment.