From 4959fabd2946fc654ac7ff520d9da1e8b49c60d8 Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Mon, 25 Nov 2019 16:50:17 +0100 Subject: [PATCH] Run audit if deps changed, on merge requests and scheduled --- .github/workflows/audit.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/audit.yml diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml new file mode 100644 index 0000000..b86ce81 --- /dev/null +++ b/.github/workflows/audit.yml @@ -0,0 +1,31 @@ +name: Security audit +on: + schedule: + - cron: '0 1 * * *' + push: + paths: + - '**/Cargo.toml' + - '**/Cargo.lock' + pull_request: + +jobs: + security_audit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + + - name: Cache cargo registry + uses: actions/cache@v1 + with: + path: /usr/share/rust/.cargo/registry + key: ${{ runner.os }}-cargo-registry + + - name: Cache cargo index + uses: actions/cache@v1 + with: + path: /usr/share/rust/.cargo/git + key: ${{ runner.os }}-cargo-index + + - uses: actions-rs/audit-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }}