From 76872a14195b5c3af99268ff6142ebc17c614f96 Mon Sep 17 00:00:00 2001 From: Flavio Castelli Date: Fri, 4 Oct 2024 08:58:29 +0200 Subject: [PATCH] Fix GHA invoking cargo audit We recently got a major version update of the audit-check GHA. This version invokes: ```console cargo audit --json --file ./Cargo.lock ```` Which fails, because we don't have a `Cargo.lock` file. This commit makes sure the `Cargo.lock` is present prior to invoking `cargo audit`. Signed-off-by: Flavio Castelli --- .github/workflows/security-audit.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/security-audit.yml b/.github/workflows/security-audit.yml index 509f28e4dd..8b3d85aa12 100644 --- a/.github/workflows/security-audit.yml +++ b/.github/workflows/security-audit.yml @@ -19,6 +19,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 + - name: Generate lockfile + run: cargo generate-lockfile - uses: rustsec/audit-check@69366f33c96575abad1ee0dba8212993eecbe998 # v2.0.0 with: token: ${{ secrets.GITHUB_TOKEN }}