update NVD mirror #380
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
name: update NVD mirror | |
# NOTE: NVD asks that automated requests only be made every two hours. | |
# https://nvd.nist.gov/developers/start-here | |
on: | |
schedule: | |
- cron: '42 0/2 * * *' | |
jobs: | |
commit: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout nvd-api-client | |
uses: actions/checkout@v4 | |
with: | |
repository: eslerm/nvd-api-client | |
path: nvd-api-client | |
- name: checkout nvd-mirror | |
uses: actions/checkout@v4 | |
with: | |
ref: main | |
repository: eslerm/nvd-mirror | |
path: nvd-mirror | |
- name: run nvd-api-client | |
run: | | |
./nvd-api-client/nvd_api_client.py --debug --auto --path nvd-mirror/ | |
- name: commit changes | |
run: | | |
cd nvd-mirror/ | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git add * | |
git commit -m "🤖 NVD update at $(date +'%Y-%m-%dT%H:%M:%S%z')" | |
git push | |