Fix CI always using an outdated version of rustsec-admin (#1660)

* Fix CI always using an outdated version of rustsec-admin

* Bump the cache key in tandem with version bump

* Dummy commit to make sure CI works on subsequent runs

* Check that the required version is installed, reinstall if not

* Fix shell syntax

* Dummy commit to make sure CI works on subsequent runs
This commit is contained in:
Sergey "Shnatsel" Davidoff
2023-03-24 14:38:59 +00:00
committed by GitHub
parent cda37f498a
commit d6377e0188
4 changed files with 12 additions and 8 deletions

View File

@@ -19,8 +19,9 @@ jobs:
- name: Install rustsec-admin
run: |
if [ ! -f $HOME/.cargo/bin/rustsec-admin ]; then
cargo install rustsec-admin --vers 0.8.5
VERSION="0.8.5"
if ! ( rustsec-admin --version | grep -q "$VERSION" ); then
cargo install rustsec-admin --force --vers "$VERSION"
fi
- name: Assign IDs

View File

@@ -16,8 +16,9 @@ jobs:
path: ~/.cargo/bin
key: rustsec-admin-v0.8.5
- run: |
if [ ! -f $HOME/.cargo/bin/rustsec-admin ]; then
cargo install rustsec-admin --vers 0.8.5
VERSION="0.8.5"
if ! ( rustsec-admin --version | grep -q "$VERSION" ); then
cargo install rustsec-admin --force --vers "$VERSION"
fi
mkdir -p crates
rustsec-admin osv crates

View File

@@ -16,8 +16,9 @@ jobs:
path: ~/.cargo/bin
key: rustsec-admin-v0.8.5
- run: |
if [ ! -f $HOME/.cargo/bin/rustsec-admin ]; then
cargo install rustsec-admin --vers 0.8.5
VERSION="0.8.5"
if ! ( rustsec-admin --version | grep -q "$VERSION" ); then
cargo install rustsec-admin --force --vers "$VERSION"
fi
rustsec-admin web .
git config user.name github-actions

View File

@@ -20,8 +20,9 @@ jobs:
- name: Install rustsec-admin
run: |
if [ ! -f $HOME/.cargo/bin/rustsec-admin ]; then
cargo install rustsec-admin --vers 0.8.5
VERSION="0.8.5"
if ! ( rustsec-admin --version | grep -q "$VERSION" ); then
cargo install rustsec-admin --force --vers "$VERSION"
fi
- name: Lint advisories