mirror of
https://github.com/rustsec/advisory-db.git
synced 2026-07-21 00:57:09 -04:00
40 lines
1.2 KiB
YAML
40 lines
1.2 KiB
YAML
name: Export to OSV format
|
|
|
|
on:
|
|
push:
|
|
branches: main
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
publish-web:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write # needed for pushing back to the repo
|
|
steps:
|
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
ref: osv
|
|
persist-credentials: true # persists the token for git push below
|
|
|
|
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
id: admin-cache
|
|
with:
|
|
path: ~/.cargo/bin
|
|
key: rustsec-admin-5a1737650d9b27d38941a23ccca1cfaecf568b63
|
|
|
|
- name: Install rustsec-admin
|
|
if: steps.admin-cache.outputs.cache-hit != 'true'
|
|
run: cargo install --git https://github.com/rustsec/rustsec rustsec-admin --rev 5a1737650d9b27d38941a23ccca1cfaecf568b63
|
|
|
|
- run: |
|
|
mkdir -p crates
|
|
rustsec-admin osv crates
|
|
# FIXME: hack to avoid committing advisories without an ID
|
|
rm -f crates/RUSTSEC-0000-0000.json
|
|
git config user.name github-actions
|
|
git config user.email github-actions@github.com
|
|
git add .
|
|
git commit -m "Update OSV exported data" || true
|
|
git push || true
|