Update Data #15768
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 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 }} | |
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) | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 'pypy3.10' | |
- name: Update data | |
run: | | |
mkdir -p advisories | |
pip install -r requirements.txt | |
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 |