-
Notifications
You must be signed in to change notification settings - Fork 5
50 lines (49 loc) · 1.3 KB
/
cron.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Update secfixes tracker
on:
schedule:
- cron: "0 */6 * * *"
workflow_dispatch:
jobs:
update:
name: Update
runs-on: ubuntu-latest
container:
image: python:3.9-alpine
env:
FLASK_APP: secfixes_tracker
SECFIXES_TRACKER_CONFIG: application.cfg
steps:
- name: Check out code
uses: actions/checkout@v2
- 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@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public