-
Notifications
You must be signed in to change notification settings - Fork 5
39 lines (36 loc) · 1.16 KB
/
python-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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