Skip to content

update codeql

update codeql #895

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# rust-clippy is a tool that runs a bunch of lints to catch common
# mistakes in your Rust code and help improve your Rust code.
# More details at https://github.com/rust-lang/rust-clippy
# and https://rust-lang.github.io/rust-clippy/
name: rust-clippy analyze
permissions:
contents: read
on:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
jobs:
rust-clippy-analyze:
if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]')"
name: Run rust-clippy analyzing
runs-on: ubuntu-24.04
permissions:
contents: read
security-events: write
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
steps:
- name: Checkout code
uses: actions/[email protected]
with:
persist-credentials: false
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: clippy
- name: Cache Cargo packages
id: cache-cargo-packages
uses: actions/[email protected]
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo
- name: Install required cargo
#if: steps.cache-cargo-packages.outputs.cache-hit != 'true'
run: cargo install clippy-sarif sarif-fmt || true
continue-on-error: true
- name: Run rust-clippy
run:
chmod +x init_clippy_args.sh && . ./init_clippy_args.sh && cargo --cfg reqwest_unstable clippy --all-features --message-format=json ${{ env.CLIPPY_ARGS }} | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
- name: Upload analysis results to GitHub
uses: github/codeql-action/[email protected]
with:
sarif_file: rust-clippy-results.sarif
wait-for-processing: true
- name: Build the binary
run:
chmod +x release_build.sh && rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu && ./release_build.sh --portable
- name: Upload Artifact
uses: actions/[email protected]
with:
name: hypixel-skyblock-util-tools
path: target/x86_64-unknown-linux-gnu/release/hypixel-skyblock-util-tools