Add automation
This commit is contained in:
parent
73100956f8
commit
ba4b7d9e2e
|
@ -0,0 +1,30 @@
|
|||
name: Update Data
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
schedule:
|
||||
# Once an hour:35
|
||||
- cron: '35 * * * *'
|
||||
jobs:
|
||||
update:
|
||||
name: Update data
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.head_ref }}
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
- name: Update data
|
||||
run: |
|
||||
mkdir -p advisories
|
||||
python main.py
|
||||
id: update_advisories
|
||||
- uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: Update Advisories
|
||||
commit_author: 'github-actions[bot] <github-actions[bot]@users.noreply.github.com>'
|
||||
file_pattern: "advisories/*.json"
|
||||
skip_fetch: true
|
||||
skip_checkout: true
|
1
main.py
1
main.py
|
@ -3,7 +3,6 @@ import json
|
|||
import re
|
||||
import datetime
|
||||
|
||||
|
||||
TITLE_REGEX = r"\[(?P<date>\d+ \w+ \d{4})\] (?P<id>ELA-\d+-\d+) (?P<package>[\w\-\.]+) - (?P<type>[\w ]+)"
|
||||
CVE_REGEX = r"CVE-\d{4}-\d{4,7}"
|
||||
DETAILS_REGEX = r"\[(?P<codename>\w+)\] - (?P<package>[\w\-\.]+) (?P<version>(?:(?:[0-9]{1,9}):)?(?:[0-9][0-9a-z\.+~-]*)(?:(?:-[0-0a-z\.+~]+))?)"
|
||||
|
|
Loading…
Reference in New Issue