Automate your GitHub README with your latest blog posts
Keep your GitHub profile README up to date with your latest blog posts using GitHub Actions. Learn how to set up a scheduled workflow that fetches your RSS feed and updates your README automatically every week.

This article explains how to use the gautamkrishnar/blog-post-workflow GitHub Action to automatically update a profile README with the latest posts from an RSS feed. The process involves creating a YAML workflow file scheduled with a cron job and adding specific comment tags to the README.md file to mark where the dynamic blog list should be injected.
I recently found the GitHub Action gautamkrishnar/blog-post-workflow and thought: this could keep my profile README up to date automatically.
Since I already refactored my Docusaurus RSS feed (see Best Practice - Customizing the Docusaurus RSS Feed for Full Content & Images), it's a great fit for automating the latest ten posts on my GitHub profile.
This is the second GitHub Action running on this blog; the first one, described in GitHub - Use Actions to deploy this blog, publishes the site itself.
Let's add a scheduled GitHub Action (for example, every Monday) to update my cavo789 repo automatically.
The Result
This is not a mockup — it's the actual, live output of the workflow, fetched straight from my cavo789/cavo789 README as it stands today:
<!-- BLOG-POST-LIST:START --><tr><td>Adding Reader Reactions to Your Docusaurus Blog</td><td>https://www.avonture.be/blog/docusaurus-reactions</td></tr><tr><td>AI-Powered Code Tooltips in Docusaurus — Explain Like I'm Five</td><td>https://www.avonture.be/blog/docusaurus-eli5-snippet-tooltips</td></tr><tr><td>Meerkat Mischief: Sprinkling Easter Eggs Across my Blog</td><td>https://www.avonture.be/blog/docusaurus-easter-eggs</td></tr><tr><td>ripgrep — The Search Tool That Changed My WSL2 Workflow</td><td>https://www.avonture.be/blog/ripgrep</td></tr><tr><td>git worktree: Work on Two Branches at the Same Time</td><td>https://www.avonture.be/blog/git-worktree</td></tr><!-- ... 5 more rows ... --><!-- BLOG-POST-LIST:END -->
Nine real articles, injected automatically between the two comment tags — exactly the <tr><td>$title</td><td>$url</td></tr> template from the workflow below, populated from the live RSS feed with no manual edit.
Create the workflow YAML file
So, just to make things clear:
- Once a week, I want the
README.mdfile in my cavo789 repo to be updated automatically. - The content of the
My last published articles on my blogchapter will be rewritten and the list of articles will come from my blog/rss.xml file.
Let's start by cloning the repository.
So, in my case, I'll clone my cavo789 repo on my disk then start VSCode to edit it.
I have to create a GitHub action (so I should create the .github/workflows folder if not yet present).
And in that folder, I'll create a new YAML file, let's call it blog-post-workflow.yml:
name: Latest blog post workflowon: schedule: # Run workflow automatically (in a cron) - cron: "0 12 * * 1" # Runs every Monday at 12:00 UTC workflow_dispatch: # This will allow to run the workflow manually too
permissions: contents: write # To write the generated contents to the readme
concurrency: group: blog-post-readme cancel-in-progress: true
jobs: update-readme-with-blog: # A profile README lives in the repository named after its owner # (cavo789/cavo789): anywhere else, there is no README to update. if: github.repository == format('{0}/{0}', github.repository_owner) runs-on: ubuntu-latest timeout-minutes: 10 steps: # Both actions are pinned to a commit SHA rather than a tag. That matters # most in this workflow: it is the only one holding `contents: write`, so # whoever controls the code behind these references can commit to the # repository. A tag can be repointed at new code at any time; a SHA cannot. - name: Checkout Repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Fetch and Update README # v1 is an annotated tag; this is the commit it dereferences to. uses: gautamkrishnar/blog-post-workflow@f177491c77670f150ab4e9b9890254d8eba4164b # v1 with: feed_list: "https://www.avonture.be/blog/rss.xml" max_post_count: 10 comment_tag_name: "BLOG-POST-LIST" date_format: "yyyy-mm-dd" template: "<tr><td>$title</td><td>$url</td></tr>" commit_message: "feat: Update README with latest blog posts"This GitHub Actions workflow automatically updates a profile README with the latest blog posts every Monday at noon UTC, or whenever someone manually triggers it. It fetches blog posts from an RSS feed and inserts them into the README using a table format, then commits the changes back to the repository.
Step by step explanations
The introduction block
Not too difficult here, it'll be the name of our action.
name: Latest blog post workflow
Here, we'll instruct GitHub to run our workflow using a cron i.e. automatically based on a specific time schedule. In the example below, every Monday at 12:00 UTC.
on:
schedule: # Run workflow automatically (in a cron)
- cron: '0 12 * * 1' # Runs every Monday at 12:00 UTC
workflow_dispatch: # This will allow to run the workflow manually too
but we also want to be able to start the workflow manually. To do this, just open your repo using a browser, click on the Actions button and, in the left sidebar, you'll see the action (Latest blog post workflow in our example) and find the Run workflow button somewhere at the right part of the screen.
We also need to allow the action to write files back (since we'll update the README.md file).
permissions:
contents: write # To write the generated contents to the readme
The jobs block
We need to foresee two steps; the first one to clone the repo and the second one to do the main job.
The first step is like on your computer: you need to git clone the repo before being able to update it.
The second step is handled by the gautamkrishnar/blog-post-workflow@v1 action.
jobs:
update-readme-with-blog:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Fetch and Update README
uses: gautamkrishnar/blog-post-workflow@v1
with:
feed_list: 'https://www.avonture.be/blog/rss.xml'
max_post_count: 10
comment_tag_name: 'BLOG-POST-LIST'
date_format: 'yyyy-mm-dd'
template: "<tr><td>$title</td><td>$url</td></tr>"
commit_message: 'feat: Update README with latest blog posts'
You can find detailed documentation on its official site: https://github.com/marketplace/actions/blog-post-workflow but, in short:
feed_listis the source RSS to query for articlesmax_post_countis the maximum number of blog posts to retrieve and to inject in yourREADME.mdfilecomment_tag_nameis the commented block to replace (we'll see this below)date_formatto make sure, if you show dates in your content, it's based on your desired formattemplateis a ... template (HTML in my case) that will be used for any entries in your result (so if you're retrieving 10 articles, you'll obtain a string with ten times your template) andcommit_messagewill be used by thegautamkrishnar/blog-post-workflowaction to push changes to your repo back.
Updating the README.md file
We've seen that, in your step, we've instructed gautamkrishnar/blog-post-workflow to scan for a comment tag called BLOG-POST-LIST.
Let's now see how it can be used:
<!-- markdownlint-disable MD033 -->
# Hi there 👋
Get the full list of my repositories on [https://www.avonture.be/repositories](https://www.avonture.be/repositories)


## My last published articles on my blog
I'm publishing at least one article by week on my [blog](https://www.avonture.be). Below the last nine ones:
<table> <tr><th>Title</th><th>Link</th></tr> <!-- BLOG-POST-LIST:START --><!-- BLOG-POST-LIST:END --></table>This is a GitHub profile README markdown file that displays a greeting, links to the user's repository list, and includes dynamically generated statistics about their GitHub activity and programming languages. It also sets up a placeholder for automatically listing recent blog posts.
As you can see, there is a <!-- BLOG-POST-LIST:START --> and <!-- BLOG-POST-LIST:END --> block in my file — the same two tags the live output at the top of this article was injected between.
And now, not really a secret: the GitHub action will thus generate an HTML string with my 10 articles then inject it in my file by removing the two comment tags and push the change to GitHub.
From now on, every Monday, my repo will be automatically updated.
Easy no?
Loading comments…




