Skip to content

Commit bae8754

Browse files
jensimJens Brimfors
authored andcommitted
Create rust-audit.yml
1 parent a75fe38 commit bae8754

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/rust-audit.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Rust security audit
2+
3+
on:
4+
schedule:
5+
- cron: '0 2 * * *' # run at 2 AM UTC
6+
push:
7+
paths:
8+
- '**/Cargo.toml'
9+
- 'Cargo.lock'
10+
11+
jobs:
12+
security-audit:
13+
runs-on: ubuntu-latest
14+
if: "!contains(github.event.head_commit.message, 'ci skip')"
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: actions-rs/audit-check@v1.2.0
18+
with:
19+
token: ${{ secrets.GITHUB_TOKEN }}
20+
- name: Discord notification
21+
if: failure()
22+
env:
23+
run_url: "https://github.com/tokio-rs/tokio/actions/runs/${{ github.run_id }}"
24+
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
25+
DISCORD_USERNAME: GitHub dependency audit
26+
uses: Ilshidur/action-discord@f237343
27+
with:
28+
args: "Dependency security audit failed.\n${{ env.run_url }}"

0 commit comments

Comments
 (0)