-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Monthly Python Script Execution | ||
|
||
on: | ||
schedule: | ||
# 每个月2号的00:00 UTC运行脚本 | ||
- cron: '0 0 2 * *' | ||
workflow_dispatch: # 也允许手动触发工作流 | ||
|
||
jobs: | ||
run_python_script: | ||
runs-on: ubuntu-latest # 使用 GitHub 提供的 Ubuntu 环境 | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 # 检出仓库代码 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' # 设置 Python 版本 | ||
|
||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt # 安装 Python 依赖 | ||
- name: Run the Python script | ||
run: | | ||
python dashboard/company/scripts/workflow.py # 执行 workflow.py 脚本 | ||
python dashboard/repository/scripts/repo_name.py | ||
python dashboard/repository/scripts/repo_data.py | ||
env: | ||
xlabDB_HOST: ${{ secrets.DB_HOST }} | ||
xlabDB_USER: ${{ secrets.DB_USER }} | ||
xlabDB_PASSWORD: ${{ secrets.DB_PASSWORD }} | ||
dashboardDB_HOST: ${{ secrets.DASHBOARD_DB_HOST }} | ||
dashboardDB_USER: ${{ secrets.DASHBOARD_DB_USER }} | ||
dashboardDB_PASSWORD: ${{ secrets.DASHBOARD_DB_PASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
requests | ||
pandas | ||
clickhouse-driver | ||
datetime |