2023-01-12 10:16:15 +00:00
|
|
|
name: Update Data
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
|
|
schedule:
|
|
|
|
- cron: '7 18 * * *'
|
|
|
|
jobs:
|
|
|
|
update:
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
packages: write
|
|
|
|
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'
|
2023-01-12 10:23:46 +00:00
|
|
|
cache: 'pip'
|
2023-01-12 10:16:15 +00:00
|
|
|
- name: Update data
|
|
|
|
run: |
|
|
|
|
pip install -r requirements.txt
|
|
|
|
python update.py
|
|
|
|
- uses: stefanzweifel/git-auto-commit-action@v4
|
|
|
|
with:
|
|
|
|
commit_message: Update KB Data
|
|
|
|
commit_author: 'github-actions[bot] <github-actions[bot]@users.noreply.github.com>'
|
|
|
|
file_pattern: "data.json"
|