I created my first GitHub Action, surprisingly it became so much popular so that it is now one of the top 20 most used GitHub actions internationally. This is the story of the Blog Post Workflow which started as a side project, now running on thousands of Github actions runner every hour.
What is Blog Post Workflow?
Blog Post workflow is a GitHub action that will allow you to show your latest blog post, StackOverflow activity, Youtube videos, and a lot more on your GitHub profile readme. It looks like the following,
GitHub launched GitHub actions on November 13, 2020. It was a huge success. People started migrating their CI-CD to Github actions pretty soon. It provided a really good environment to run the CI-CD workflows since it was powered by Azure. Later, next year GitHub also launched the GitHub profile readme. People started to do a lot of cool stuff combining the power of both the GitHub features soon. This included crazy ideas like generating an animated image of your contribution graph that is eaten by a snake.
I also noticed that people started taking their GitHub profile readme pretty seriously. People even started using the profile readme to replace their portfolio websites. Using GitHub profile readme as a portfolio page is actually a great idea in my opinion for most open source devs out there since their projects are already on GitHub. Lots of GitHub actions and services had popped up from the open-source community. Most of them even gained thousands of active users.
At that time, I learned a lot about GitHub actions and even started using it for some of my personal GitHub projects. It was pretty cool and I Immediately got really good at it. I also started experimenting with the GitHub profile readme. I thought about creating a GitHub action myself so that I can learn more about the procedure of creating one. An idea immediately stuck in my mind. Since most people are using GitHub profile readme to showcase their portfolio, what if someone wants to showcase their blog posts. Nowadays most people don’t host their personal blog themselves They usually use popular blogging services such as Medium or Dev.to to write blogs. This was how the Blog Post Workflow was born.
What happened later!
I was extremely overwhelmed by the support from the open-source community for the project. Within 24 hours of its release, it gained hundreds of stars. It got into the GitHub trending projects list. I got lots of requests to make the project even more customizable. My first priory while working on those requests was to deliver the feature without sacrificing the simplicity of the project. I also found my project Growing in popularity over time. I wrote test cases to make sure that everything is working as expected.
People started talking about the project on blog posts, forums, and social media. Some even created youtube videos about it:
It got even more feature requests from the community. I was able to deliver almost all of them. Right now blog post workflow has more than 20+ options that will let you customize the workflow according to your use case. I was awestruck to know that It is now one of the top 20 most used / most starred GitHub actions internationally in the GitHub marketplace.
If you are planning to create a GitHub action yourself, make sure that you follow the following principles:
- Write proper documentation documenting all the features and options.
- Add proper examples of the workflow’s real-world usages in the readme.
- Keep the API simple and easy to use.
- Add customization APIs so that people can change various behavior of the workflow according to their use case.
- When you add customization parameters to your workflow, make sure that you keep it optional so that it won’t make your workflow complex to use.
- Always use the Github provided token to commit and push to Github, It will make your workflow simpler and easy to use.
- If your workflow uses a cronjob trigger, make sure that you do dummy commits occasionally to keep the repository active. See this issue for more details.
- Write proper test cases and make sure that new features won’t break the workflow.
- Community is everything, build it.
- Wear a mask! 😉
If you reached this far, thanks for reading my experience about creating my first GitHub Action. Special thanks to the open-source community, users, influencers, and contributors of the blog post workflow.