-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (40 loc) · 1.05 KB
/
update_api.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
40
41
42
43
44
45
name: 更新api_data
on:
# 手动触发
workflow_dispatch:
schedule:
# 每天凌晨更新数据
- cron: '0 0 * * *'
jobs:
update_api_data:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@master
with:
fetch-depth: 0
persist-credentials: false
# 设置python环境
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
cache: pip
# pip install
- name: Install dependencies
run: |
pip install -r requirements.txt
# 更新api_data
- name: Update api_data
run: |
python update_data.py
- name: 更新api项目
uses: Smart-Transportation/[email protected]
with:
github_token: ${{ secrets.GH_TOKEN }}
branch: 'main'
author_email: 'github-actions[bot]@users.noreply.github.com'
author_name: 'github-actions[bot]'
message: '🐳 chore: 更新api数据'