Skip to content

Commit f91c52b

Browse files
authored
Install rustsec from git (#2299)
1 parent dde3543 commit f91c52b

File tree

5 files changed

+28
-28
lines changed

5 files changed

+28
-28
lines changed

.github/workflows/assign-ids.yml

+4-6
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,15 @@ jobs:
1212
- uses: actions/checkout@v4
1313

1414
- name: Cache cargo bin
15+
id: admin-cache
1516
uses: actions/cache@v4
1617
with:
1718
path: ~/.cargo/bin
18-
key: rustsec-admin-v0.8.8
19+
key: rustsec-admin-b7c69254bda9b8f4c94bc5eaef47e5bb3a97d8cd
1920

2021
- name: Install rustsec-admin
21-
run: |
22-
VERSION="0.8.8"
23-
if ! ( rustsec-admin --version | grep -q "$VERSION" ); then
24-
cargo install rustsec-admin --force --vers "$VERSION"
25-
fi
22+
if: steps.admin-cache.outputs.cache-hit != 'true'
23+
run: cargo install --git https://github.com/rustsec/rustsec rustsec-admin --rev b7c69254bda9b8f4c94bc5eaef47e5bb3a97d8cd
2624

2725
- name: Assign IDs
2826
id: assign

.github/workflows/export-osv.yml

+8-5
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,18 @@ jobs:
1111
- uses: actions/checkout@v4
1212
with:
1313
ref: osv
14+
1415
- uses: actions/cache@v4
16+
id: admin-cache
1517
with:
1618
path: ~/.cargo/bin
17-
key: rustsec-admin-v0.8.8
19+
key: rustsec-admin-b7c69254bda9b8f4c94bc5eaef47e5bb3a97d8cd
20+
21+
- name: Install rustsec-admin
22+
if: steps.admin-cache.outputs.cache-hit != 'true'
23+
run: cargo install --git https://github.com/rustsec/rustsec rustsec-admin --rev b7c69254bda9b8f4c94bc5eaef47e5bb3a97d8cd
24+
1825
- run: |
19-
VERSION="0.8.8"
20-
if ! ( rustsec-admin --version | grep -q "$VERSION" ); then
21-
cargo install rustsec-admin --force --vers "$VERSION"
22-
fi
2326
mkdir -p crates
2427
rustsec-admin osv crates
2528
# FIXME: hack to avoid committing advisories without an ID

.github/workflows/publish-web.yml

+8-5
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,18 @@ jobs:
1111
- uses: actions/checkout@v4
1212
with:
1313
ref: gh-pages
14+
1415
- uses: actions/cache@v4
16+
id: admin-cache
1517
with:
1618
path: ~/.cargo/bin
17-
key: rustsec-admin-v0.8.8
19+
key: rustsec-admin-b7c69254bda9b8f4c94bc5eaef47e5bb3a97d8cd
20+
21+
- name: Install rustsec-admin
22+
if: steps.admin-cache.outputs.cache-hit != 'true'
23+
run: cargo install --git https://github.com/rustsec/rustsec rustsec-admin --rev b7c69254bda9b8f4c94bc5eaef47e5bb3a97d8cd
24+
1825
- run: |
19-
VERSION="0.8.8"
20-
if ! ( rustsec-admin --version | grep -q "$VERSION" ); then
21-
cargo install rustsec-admin --force --vers "$VERSION"
22-
fi
2326
rustsec-admin web .
2427
git config user.name github-actions
2528
git config user.email github-actions@github.com

.github/workflows/sync-ids.yml

+4-6
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,15 @@ jobs:
1414
- uses: actions/checkout@v4
1515

1616
- name: Cache cargo bin
17+
id: admin-cache
1718
uses: actions/cache@v4
1819
with:
1920
path: ~/.cargo/bin
20-
key: rustsec-admin-v0.8.9
21+
key: rustsec-admin-b7c69254bda9b8f4c94bc5eaef47e5bb3a97d8cd
2122

2223
- name: Install rustsec-admin
23-
run: |
24-
VERSION="0.8.9"
25-
if ! ( rustsec-admin --version | grep -q "$VERSION" ); then
26-
cargo install rustsec-admin --force --vers "$VERSION"
27-
fi
24+
if: steps.admin-cache.outputs.cache-hit != 'true'
25+
run: cargo install --git https://github.com/rustsec/rustsec rustsec-admin --rev b7c69254bda9b8f4c94bc5eaef47e5bb3a97d8cd
2826

2927
- name: Synchronize IDs
3028
id: sync_ids

.github/workflows/validate.yml

+4-6
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,15 @@ jobs:
1313
- uses: actions/checkout@v4
1414

1515
- name: Cache cargo bin
16+
id: admin-cache
1617
uses: actions/cache@v4
1718
with:
1819
path: ~/.cargo/bin
19-
key: rustsec-admin-v0.8.8
20+
key: rustsec-admin-b7c69254bda9b8f4c94bc5eaef47e5bb3a97d8cd
2021

2122
- name: Install rustsec-admin
22-
run: |
23-
VERSION="0.8.8"
24-
if ! ( rustsec-admin --version | grep -q "$VERSION" ); then
25-
cargo install rustsec-admin --force --vers "$VERSION"
26-
fi
23+
if: steps.admin-cache.outputs.cache-hit != 'true'
24+
run: cargo install --git https://github.com/rustsec/rustsec rustsec-admin --rev b7c69254bda9b8f4c94bc5eaef47e5bb3a97d8cd
2725

2826
- name: Lint advisories
2927
run: rustsec-admin lint --skip-namecheck rustdecimal,vec-const

0 commit comments

Comments
 (0)