Skip to content

Commit

Permalink
Security audit worflow in GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Zabaluev committed Jan 11, 2021
1 parent 3d51b65 commit 682032d
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/audit.yml
@@ -0,0 +1,30 @@
name: Security audit
on:
push:
paths:
- Cargo.lock
jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- id: ls-crates-io-index
name: Get head commit hash of crates.io registry index
run: |
commit=$(
git ls-remote --heads https://github.com/rust-lang/crates.io-index.git master |
cut -f 1
)
echo "::set-output name=head::$commit"
- name: Cache cargo registry index
uses: actions/cache@v2
with:
path: ~/.cargo/registry/index
key: cargo-index-${{ steps.ls-crates-io-index.outputs.head }}
restore-keys: |
cargo-index-
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 682032d

Please sign in to comment.