Skip to content

Fetch rss files

Fetch rss files #1748

Workflow file for this run

name: Fetch rss files
on:
schedule:
# At minute 0 past every hour.
- cron: "0 */1 * * *"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node 22.x
uses: actions/setup-node@v4
with:
node-version: 22
- name: Fetch RSS Blogs
run: node ./scripts/rss.parse.js
- name: Git Commit
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git add .
if git diff-index --quiet HEAD; then
echo "No changes to commit"
echo "SKIP_PUSH=true" >> $GITHUB_ENV
else
git commit -s -m "CI(Github Actions Bot): update blog post list from rssList"
echo "SKIP_PUSH=false" >> $GITHUB_ENV
fi
- name: Push changes to main branch
if: env.SKIP_PUSH == 'false'
uses: ad-m/[email protected]
with:
branch: main