Update secfixes tracker #1631
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 secfixes tracker | |
on: | |
schedule: | |
- cron: "0 */6 * * *" | |
workflow_dispatch: | |
jobs: | |
update: | |
name: Update | |
runs-on: ubuntu-latest | |
container: | |
image: python:3.12-alpine | |
env: | |
FLASK_APP: secfixes_tracker | |
SECFIXES_TRACKER_CONFIG: application.cfg | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
apk add alpine-sdk gcc musl-dev libc-dev | |
pip3 install -r requirements.txt | |
- name: Initialize DB | |
run: flask init-db | |
- name: Import APKINDEX | |
run: flask import-apkindex | |
- name: Import secfixes | |
run: flask import-secfixes | |
- name: Import NVD | |
run: | | |
for year in $(seq 2018 $(date "+%Y")) | |
do | |
flask import-nvd $year | |
done | |
- name: Update states | |
run: flask update-states | |
- name: Clean existing files | |
run: rm -rf data && mkdir data | |
- name: Export JSON files | |
run: flask export | |
- name: Compress | |
run: | | |
tar cvfz all.tar.gz data | |
mkdir -p public | |
mv all.tar.gz public | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public |