|
1 |
| -name:Blog posts on ReadMe |
| 1 | +name:Latest blog post workflow |
2 | 2 | on:
|
3 | 3 | schedule:
|
4 |
| -# Runs every day at 9am UTC |
5 |
| - -cron:'0 1 * * *' |
| 4 | +# Runs every hour |
| 5 | + -cron:'0 * * * *' |
| 6 | +workflow_dispatch: |
6 | 7 |
|
7 | 8 | jobs:
|
8 |
| -run: |
9 |
| -# The type of runner that the job will run on |
| 9 | +update-readme-with-blog: |
| 10 | +name:Update this repo's README with latest blog posts |
10 | 11 | runs-on:ubuntu-latest
|
11 |
| - |
12 |
| -# Steps represent a sequence of tasks that will be executed as part of the job |
13 | 12 | steps:
|
14 | 13 | -uses:actions/checkout@v2
|
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 |
| 14 | + -uses:gautamkrishnar/blog-post-workflow@master |
28 | 15 | with:
|
29 |
| -github_token:${{ secrets.GITHUB_TOKEN }} |
| 16 | +max_post_count:"4" |
| 17 | +feed_list:"https://musing.vercel.app/feed.xml" |