.github: use actions-rs/audit-check to run `cargo audit`
@@ -9,37 +9,16 @@ on:
- cron: '0 0 * * *'
jobs:
- # TODO: use actions-rs/audit-check
security_audit:
name: Security Audit
runs-on: ubuntu-latest
steps:
- - name: Checkout sources
- uses: actions/checkout@v1
-
- - name: Cache cargo registry
- uses: actions/cache@v1
- with:
- path: ~/.cargo/registry
- key: ${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }}
-
- - name: Cache cargo index
+ - uses: actions/checkout@v1
+ - name: Cache cargo bin
uses: actions/cache@v1
with:
- path: ~/.cargo/git
- key: ${{ runner.os }}-cargo-index-${{ hashFiles('Cargo.lock') }}
-
- - name: Install stable toolchain
- uses: actions-rs/toolchain@v1
- with:
- toolchain: stable
- override: true
-
- - name: Install cargo audit
- run: cargo install cargo-audit
-
- - name: Run cargo audit
- uses: actions-rs/cargo@v1
+ path: ~/.cargo/bin
+ key: ${{ runner.os }}-cargo-audit-v0.11.2
+ - uses: actions-rs/audit-check@v1
with:
- command: audit
- args: --deny-warnings
+ token: ${{ secrets.GITHUB_TOKEN }}
