Blog Post Workflow GitHub Action
source link: https://dev.to/gautamkrishnar/blog-post-workflow-github-action-1821
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
My Workflow
Show your latest blog posts from any sources or StackOverflow activity or Youtube Videos on your GitHub profile/project readme automatically using the RSS feed.
With an amazing open source community, this action is currently used by more than 4K+ users and it is one of the top 20 most used/starred Github Actions internationally in the GitHub Marketplace. It also has 1.5K+ stars.
For this hackathon i tried to improve my existing Github action by doing the following:
- Refactored code
- Added categories support
- Aded templating support to categories
Project URL: https://github.com/gautamkrishnar/blog-post-workflow
License: https://github.com/gautamkrishnar/blog-post-workflow/blob/master/LICENSE
Story of the blog post workflow: How I built one of the top 20 most used Github Actions
Submission Category:
Wacky Wildcards
Yaml File or Link to Code
name: Latest blog post workflow
on:
schedule: # Run workflow automatically
- cron: '0 * * * *' # Runs every hour, on the hour
workflow_dispatch: # Run workflow manually (without waiting for the cron to be called), through the Github Actions Workflow page directly
jobs:
update-readme-with-blog:
name: Update this repo's README with latest blog posts
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Pull in dev.to posts
uses: gautamkrishnar/blog-post-workflow@master
with:
feed_list: "https://dev.to/feed/gautamkrishnar,https://www.gautamkrishnar.com/feed/"
Getting Started Doc: https://github.com/gautamkrishnar/blog-post-workflow#how-to-use
gautamkrishnar / blog-post-workflow
Show your latest blog posts from any sources or StackOverflow activity or Youtube Videos on your GitHub profile/project readme automatically using the RSS feed
Blog post workflow
How to use
- Star this repo 😉
- Go to your repository
- Add the following section to your README.md file, you can give whatever title you want. Just make sure that you use
<!-- BLOG-POST-LIST:START --><!-- BLOG-POST-LIST:END -->
in your readme. The workflow will replace this comment with the actual blog post list# Blog posts <!-- BLOG-POST-LIST:START --> <!-- BLOG-POST-LIST:END -->
Enter fullscreen modeExit fullscreen mode - Create a folder named
.github
and create aworkflows
folder inside it, if it doesn't exist. - Create a new file named
blog-post-workflow.yml
with the following contents inside the workflows foldername: Latest blog post workflow on schedule: # Run workflow automatically - cron: '0 * * * *' # Runs every hour, on the hour workflow_dispatch: # Run workflow manually (without waiting for the cron to be called), through the Github Actions Workflow page directly jobs: update-readme-with-blog:
…Enter fullscreen modeExit fullscreen mode
Additional Resources / Info
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK