-
Notifications
You must be signed in to change notification settings - Fork 39
33 lines (30 loc) · 1020 Bytes
/
cargo-vet.yml
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
33
# Roughly based off of https://mozilla.github.io/cargo-vet/configuring-ci.html
name: cargo vet
on:
- merge_group
- push
- pull_request
# Only build for latest push/PR unless it's main or release/
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && !startsWith( github.ref, 'refs/heads/release/' ) }}
jobs:
cargo-vet:
name: Vet Dependencies
runs-on: ubuntu-latest
# Keep version in sync with rust-toolchain.toml
container: rust:1.78.0
env:
CARGO_VET_VERSION: 0.9.0
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
id: cache-vet
with:
path: /usr/local/cargo/bin/cargo-vet
key: cargo-vet-${{ env.CARGO_VET_VERSION }}
- name: Install the cargo-vet binary, if needed
if: ${{ steps.cache-vet.outputs.cache-hit != 'true' }}
run: cargo install --version ${{ env.CARGO_VET_VERSION }} cargo-vet
- name: Invoke cargo-vet
run: cargo vet --locked