-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (34 loc) · 1.03 KB
/
fetch-rss.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
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