Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2902 from input-output-hk/audit-workflow
Move security audit workflow from CircleCI to GitHub Actions
- Loading branch information
Showing
2 changed files
with
30 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |