-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate VDR Using Github Actions (#15)
* rename ci, add vdr creation yml * try to run the downloader and upload partial * add trigger on PR * make data dir * run the conversion script * run vdr creation for the whole vdr period * fix vdr artifact name * try to make nist calls use api key * fix the build * add flush * Apply suggestions from gadams Co-authored-by: George Adams <[email protected]> * add the api key secret, remove branches from workflows * check api key is actually there * remove pip and flake8 from the installs * update comments * rm newlines * fix flaky inability to find risk matrix * Update .github/workflows/vdr-creation.yml --------- Co-authored-by: George Adams <[email protected]> Co-authored-by: Martijn Verburg <[email protected]>
- Loading branch information
1 parent
10ca255
commit 777a161
Showing
4 changed files
with
59 additions
and
4 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: VDR Creation | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ main ] | ||
pull_request: # prs don't get secrets, but the API works (albeit 10x slower) without the api key | ||
branches: [ main ] | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 | ||
|
||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Download ojvg | ||
env: | ||
NIST_NVD_TOKEN: ${{ secrets.NIST_NVD_TOKEN }} | ||
run: | | ||
mkdir -p data | ||
python3 ojvg_download.py | ||
python3 ojvg_convert.py | ||
- name: Upload data directory (for debugging/introspection) | ||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | ||
with: | ||
name: data directory | ||
path: data | ||
- name: Upload final vdr | ||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | ||
with: | ||
name: final vdr | ||
path: data/vdr.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters