Files
advisory-db/.github/workflows/export-osv.yml
dependabot[bot] 923ee2b65c Bump actions/cache from 5.0.4 to 5.0.5
Bumps [actions/cache](https://github.com/actions/cache) from 5.0.4 to 5.0.5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](668228422a...27d5ce7f10)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: 5.0.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-20 19:11:59 +02:00

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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: osv
persist-credentials: true # persists the token for git push below
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
id: admin-cache
with:
path: ~/.cargo/bin
key: rustsec-admin-9909babfe97ac580d59bb48ff8f26308afcd486e
- name: Install rustsec-admin
if: steps.admin-cache.outputs.cache-hit != 'true'
run: cargo install --git https://github.com/rustsec/rustsec rustsec-admin --rev 9909babfe97ac580d59bb48ff8f26308afcd486e
- 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