Skip to content

Merge pull request #2 from acgetchell/dependabot/github_actions/actio… #4

Merge pull request #2 from acgetchell/dependabot/github_actions/actio…

Merge pull request #2 from acgetchell/dependabot/github_actions/actio… #4

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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # v1.15.2
with:
cache: true # toolchain/components are specified in rust-toolchain.toml
- name: Cache advisory database
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
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@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
if: always()
with:
name: audit-results
path: audit-results.json