Skip to content

Update RSS Feed

Update RSS Feed #3504

name: Update RSS Feed
on:
workflow_dispatch:
schedule:
- cron: '0 */4 * * *' # runs every 4 hours
jobs:
update-feed:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install feedparser jinja2 pytz beautifulsoup4
- name: Fetch and Parse RSS Feed
run: python .github/scripts/rss_parser.py
- name: Commit and push if it changed
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git diff --quiet && git diff --staged --quiet || git commit -m 'Updated RSS Feed'
git push