<!--
  canonical-url: https://www.avonture.be/blog/github-profile-last-blogposts
  published:     2026-02-09
  This is a static plain-Markdown mirror generated at build time.
  Visit the canonical URL above for the fully rendered page, with images and interactive components.
-->

# 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.

---
![Automate your GitHub README with your latest blog posts](/img/v2/github_profile_automate.webp)

**TL;DR**

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](https://www.avonture.be/blog/rss.xml) (see [Best Practice - Customizing the Docusaurus RSS Feed for Full Content & Images](/blog/blog-post-feed)), 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](/blog/github-action), publishes the site itself.*

Let's add a scheduled GitHub Action (for example, every Monday) to update my [cavo789](https://github.com/cavo789/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](https://github.com/cavo789/cavo789) README as it stands today:

```html
<!-- 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.md` file in my [cavo789](https://github.com/cavo789/cavo789) repo to be updated automatically.
* The content of the `My last published articles on my blog` chapter will be rewritten and the list of articles will come from my [blog/rss.xml](https://www.avonture.be/blog/rss.xml) file.

Let's start by cloning the repository.

So, in my case, I'll clone my [cavo789](https://github.com/cavo789/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`:

**.github/workflows/blog-post-workflow\.yml**

```yaml
name: Latest blog post workflow
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

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"
```

### Step by step explanations

#### The introduction block

Not too difficult here, it'll be the name of our action.

```yaml
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.

```yaml
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).

```yaml
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.

```yaml
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_list` is the source RSS to query for articles
* `max_post_count` is the maximum number of blog posts to retrieve and to inject in your `README.md` file
* `comment_tag_name` is the commented block to replace (we'll see this below)
* `date_format` to make sure, if you show dates in your content, it's based on your desired format
* `template` is 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) and
* `commit_message` will be used by the `gautamkrishnar/blog-post-workflow` action 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:

**README.md**

```markdown
<!-- markdownlint-disable MD033 -->

# Hi there 👋

Get the full list of my repositories on [https://www.avonture.be/repositories](https://www.avonture.be/repositories)

![Stats](https://github-readme-stats.vercel.app/api?username=cavo789&show_icons=true&theme=radical&count_private=true)

![Most used languages](https://github-readme-stats.vercel.app/api/top-langs/?username=cavo789)

## 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>
```

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?
