summaryrefslogtreecommitdiffstats
path: root/.github/workflows/pr-audit.yml
blob: 26c0ee2f1196ad9b9d259f4fbd2f687124fbef15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Pull Request Security Audit

on:
  push:
    paths:
      - '**/Cargo.toml'
  pull_request:
    paths:
      - '**/Cargo.toml'

jobs:
  security-audit:
    runs-on: ubuntu-latest
    if: "!contains(github.event.head_commit.message, 'ci skip')"
    steps:
      - uses: actions/checkout@v2

      - name: Install cargo-audit
        uses: actions-rs/cargo@v1
        with:
          command: install
          args: cargo-audit

      - name: Generate lockfile
        uses: actions-rs/cargo@v1
        with:
          command: generate-lockfile

      - name: Audit dependencies
        uses: actions-rs/cargo@v1
        with:
          command: audit