-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (36 loc) · 1 KB
/
PushBaidu.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
name: PushBaidu
on:
schedule:
- cron: '0 4 * * *'
- cron: '0 12 * * *'
- cron: '0 20 * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
push_baidu:
runs-on: ubuntu-latest # 运行环境为最新版的Ubuntu
steps:
- name: CheckOut Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Push
env:
### push token:
PUSH_BAIDU_TOKEN: ${{ secrets.PUSH_BAIDU_TOKEN }}
run: |
pip install -r tools/push_baidu/requirements.txt
python tools/push_baidu/push_baidu.py || true
- name: Commit
run: |
git config user.name ${{ github.actor }}
git config user.email ${{ github.actor }}@users.noreply.github.com
git add .
git commit -a -m "Commit PushBaidu Result" || true
- name: Push Git
uses: ad-m/github-push-action@master