Update RSS Feed #865
This file contains hidden or 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
| 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 | |