Skip to content

Commit f08bcd9

Browse files
committed
chore(ci): Enforce cargo-deny in CI
We skip failure for advisories on the step, rather than the job, to not distract contributors in thinking they broke something as that bubbles up into the PR job summary.
1 parent aada2f3 commit f08bcd9

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/audit.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Security audit
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
pull_request:
8+
paths:
9+
- '**/Cargo.toml'
10+
- '**/Cargo.lock'
11+
push:
12+
branches:
13+
- master
14+
15+
jobs:
16+
cargo_deny:
17+
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
checks:
21+
- advisories
22+
- bans licenses sources
23+
steps:
24+
- uses: actions/checkout@v3
25+
- uses: EmbarkStudios/cargo-deny-action@v1
26+
# Prevent sudden announcement of a new advisory from failing ci:
27+
continue-on-error: ${{ matrix.checks == 'advisories' }}
28+
with:
29+
command: check ${{ matrix.checks }}
30+
rust-version: stable

0 commit comments

Comments
 (0)