Skip to content

Daily Data Update

Daily Data Update #222

Workflow file for this run

name: Daily Data Update
on:
schedule:
# Run at 23:00 UTC every day (market close)
- cron: '0 23 * * *'
workflow_dispatch: # Allow manual trigger
jobs:
update:
name: Update Market Data
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
pip install yfinance pandas
- name: Update market data
run: |
python scripts/update_assets.py
- name: Commit and push if changed
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add data/*.csv
git diff --quiet && git diff --staged --quiet || (git commit -m "chore(data): market close $(date +%Y-%m-%d)" && git push)