Skip to content

Daily Update Partial Macropage Data #137

Daily Update Partial Macropage Data

Daily Update Partial Macropage Data #137

name: Daily Update Partial Macropage Data
on:
schedule:
- cron: '0 18 * * *'
push:
branches: [ "main" ]
workflow_dispatch: # 添加这个事件来手动触发
permissions:
contents: write # 允许写权限,以便提交更改
jobs:
update_tushare:
runs-on: ubuntu-latest
environment: Daily Update # 指定使用Daily Update环境
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: update tushare data
env:
TUSHARE_TOKEN: ${{secrets.TUSHARE_TOKEN}} # 将TUSHARE密钥传递给环境变量
run: python etl/tushare_etl.py
- name: update yield curve data
run: python etl/yield_curve.py
- name: Commit and Push changes # 新增步骤
run: |
git config --global user.name "afan"
git config --global user.email "[email protected]"
git add .
git commit -m "daily update tushare data"
git push