Update release assets #27
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 release assets | |
on: | |
schedule: | |
- cron: "15 4 1,8,16,24 * *" | |
workflow_dispatch: | |
jobs: | |
build-artifacts: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout search_vulns code | |
uses: actions/checkout@v3 | |
- name: Set up Python and Pip | |
uses: actions/setup-python@v4 | |
with: | |
cache: 'pip' | |
python-version: '3.8' | |
- name: Upgrade Pip | |
run: python3 -m pip install --upgrade pip | |
- name: Install tool and build DB | |
env: | |
NVD_API_KEY: ${{ secrets.NVD_API_KEY }} | |
run: NVD_API_KEY=$NVD_API_KEY ./install.sh --full | |
- name: Test CVE Completeness | |
run: python3 ./tests/test_cve_completeness.py | |
- name: Test CVE Attribute Completeness | |
run: python3 ./tests/test_cve_attr_completeness.py | |
- name: Test Exploit Completeness | |
run: python3 ./tests/test_exploit_completeness.py | |
- name: Test Related Queries Functionality | |
run: python3 ./tests/test_related_queries.py | |
- name: Get latest release tag | |
run: | | |
LATEST_TAG=$(curl -s -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/ra1nb0rn/search_vulns/releases/latest | jq -r '.tag_name') | |
echo "LATEST_RELEASE_TAG=$LATEST_TAG" >> $GITHUB_ENV | |
- name: Update resource files of latest release | |
uses: softprops/action-gh-release@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag_name: ${{ env.LATEST_RELEASE_TAG }} | |
files: | | |
vulndb.db3 | |
cveid_to_edbid.json | |
cpe_search/cpe-search-dictionary.db3 | |
cpe_search/deprecated-cpes.json |