|
1 |
| -name:Update blogposts |
| 1 | +name:Blogposts on ReadMe |
2 | 2 | on:
|
3 |
| -push: |
4 |
| -branches:["main"] |
5 |
| -workflow_dispatch: |
6 | 3 | schedule:
|
7 |
| -# Runs every hour |
8 |
| - -cron:'0 * * * *' |
9 |
| - |
| 4 | +# Runs every day at 9am UTC |
| 5 | + -cron:'0 1 * * *' |
10 | 6 |
|
11 | 7 | jobs:
|
12 |
| -update-readme-with-blog: |
13 |
| -name:Update this repo's README with latest blog posts |
| 8 | +build: |
| 9 | +# The type of runner that the job will run on |
14 | 10 | runs-on:ubuntu-latest
|
| 11 | + |
| 12 | +# Steps represent a sequence of tasks that will be executed as part of the job |
15 | 13 | steps:
|
16 |
| - -name:Checkout |
17 | 14 | -uses:actions/checkout@v2
|
18 |
| - -uses:gautamkrishnar/blog-post-workflow@master |
| 15 | + -name:Get RSS Feed |
| 16 | +uses:kohrongying/readme-the-rss@master |
| 17 | +with: |
| 18 | +feed_url:https://musing.vercel.app/feed.xml |
| 19 | +count:10 |
| 20 | + -name:Commit file changes |
| 21 | +run:| |
| 22 | + git config --global user.name 'Parth' |
| 23 | + git config --global user.email 'desaiparth2000@gmail.com' |
| 24 | + git add . |
| 25 | + git diff --quiet --cached || git commit -m "Update README" |
| 26 | + -name:Push changes |
| 27 | +uses:ad-m/github-push-action@master |
19 | 28 | with:
|
20 |
| -comment_tag_name:BLOG |
21 |
| -feed_list:"https://musing.vercel.app/feed.xml" |
| 29 | +github_token:${{ secrets.GITHUB_TOKEN }} |