-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (28 loc) · 943 Bytes
/
Copy pathupdate_rss.yml
File metadata and controls
36 lines (28 loc) · 943 Bytes
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
name: Update RSS Feed
on:
schedule:
- cron: '0 0 * * *' # 每天UTC时间00:00自动运行
workflow_dispatch: # 允许手动触发
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install feedparser PyRSS2Gen
- name: Generate RSS feed
run: |
python newaipodcast.py # 确保这里的路径与你的脚本在仓库中的相对路径匹配
- name: Commit and push if changed
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add ./rss/filtered_podcast_rss.xml # 添加你的RSS文件到git
git commit -m "Update RSS feed" -a || echo "No changes to RSS feed"
git push