photon-os-advisories/.github/workflows/update.yaml

37 lines
1.1 KiB
YAML
Raw Normal View History

2023-01-05 07:24:05 +00:00
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 }}
2023-01-05 07:25:18 +00:00
submodules: true
# pypy is much faster at generating lots of JSON
# and canonicaljson also uses pypy-json instead
# of simplejson (https://github.com/matrix-org/python-canonicaljson/pull/25/files)
2023-01-05 07:25:18 +00:00
- uses: actions/setup-python@v4
with:
2023-03-16 08:12:24 +00:00
python-version: 'pypy3.9'
2023-01-05 07:24:05 +00:00
- name: Update data
run: |
2023-01-05 07:25:18 +00:00
mkdir -p advisories
pip install -r requirements.txt
2023-01-05 07:24:05 +00:00
git submodule update --remote
git add photon-wiki
python generate.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