-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (49 loc) · 1.24 KB
/
main.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
46
47
48
49
50
51
52
53
name: update
on:
schedule:
- cron: '30 3/12 * * *' #每日更新
watch:
types: [started]
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
rss-make:
runs-on: ubuntu-latest #运行环境
steps:
- name: Checkout
uses: actions/checkout@v3
- name: 'Git set'
run: |
git init
git pull
- name: 'Set up Python'
uses: actions/setup-python@v4
with:
python-version: 3.7 #v3
- name: 'Install requirements'
run: |
pip install wget
pip install bs4
pip install urllib3 #安装依赖permissions:
- name: 'Working'
run:
python main.py #运行主程序
- name: Commit files
continue-on-error: True
run: |
git config --local user.email "dr_hamilton@foxmail.com"
git config --local user.name "Ravello-H"
git add -A
git commit -m "`date '+%Y-%m-%d %H:%M:%S'`"
git status
git push -f origin main
git status
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}