Skip to content

Merge branch 'main' into dependabot/github_actions/actions/cache-5.0.5 #166

Merge branch 'main' into dependabot/github_actions/actions/cache-5.0.5

Merge branch 'main' into dependabot/github_actions/actions/cache-5.0.5 #166

Workflow file for this run

name: "Audit dependencies"
on:
push:
paths:
- .github/workflows/audit.yml
- "**/Cargo.toml"
- "**/Cargo.lock"
pull_request:
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
schedule:
- cron: "0 6 * * 1" # Monday at 6 AM UTC
workflow_dispatch:
permissions:
contents: read
jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@2b1f5e9b395427c92ee4e3331786ca3c37afe2d7 # v1.16.0
with:
cache: true # toolchain/components are specified in rust-toolchain.toml
- name: Cache advisory database
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.cargo/advisory-db
key: advisory-db-${{ github.ref_name }}-v1
restore-keys: advisory-db-
- name: Install cargo-audit
run: cargo install --locked cargo-audit
- name: Run cargo audit
run: |
cargo audit --json > audit-results.json
cargo audit
- name: Upload audit results
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: always()
with:
name: audit-results
path: audit-results.json