39 lines
1.0 KiB
YAML
39 lines
1.0 KiB
YAML
name: Generate Record JSON
|
||
|
||
on:
|
||
workflow_dispatch: # 手動トリガー
|
||
push:
|
||
paths:
|
||
- scpt/generate_record.py # スクリプトに変更があったとき
|
||
schedule:
|
||
- cron: '0 3 * * *' # 毎日03:00 UTCに自動生成(任意)
|
||
|
||
jobs:
|
||
build:
|
||
runs-on: ubuntu-latest
|
||
|
||
steps:
|
||
- name: Checkout Repository
|
||
uses: actions/checkout@v3
|
||
|
||
- name: Set up Python
|
||
uses: actions/setup-python@v5
|
||
with:
|
||
python-version: '3.x'
|
||
|
||
- name: Install Dependencies
|
||
run: |
|
||
pip install -r requirements.txt || true # 必要なら
|
||
|
||
- name: Run Record Generator Script
|
||
run: |
|
||
python scpt/generate_record.py
|
||
|
||
- name: Commit and Push Generated JSON
|
||
run: |
|
||
git config --global user.name "GitHub Actions Bot"
|
||
git config --global user.email "actions@github.com"
|
||
git add record.json
|
||
git commit -m "🧬 Auto-generate record.json" || echo "No changes to commit"
|
||
git push origin main
|