Collect your latest articles from sources such as dev.to, and then update the README.md
.
Step 1: In your repository, create a file named README.md.template
.
Step 2: Write anything you want within the README.md.template
file.
Step 3: Embed one of the following entities within your README.md.template
:
- Article listing:
{{ template "article-list" .Articles }}
- Article table:
{{ template "article-table" .Articles }}
If you are familiar with Go templates, you have access to the root
variable, which includes the following fields:
Articles
: An array of Article. You can view the Article struct definition in model/article.go.Time
: Updated TimeAuthor
: Author of articles
Step 4: Register Github Action
- Create a file
.github/workflows/update-articles.yml
in your repository.
name: "Cronjob"
on:
schedule:
- cron: '15 0 * * *'
jobs:
update-articles:
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Generate README
uses: huantt/[email protected]
with:
username: YOUR_USERNAME_ON_DEV_TO
template-file: 'README.md.template'
out-file: 'README.md'
limit: 5
- name: Commit
run: |
if git diff --exit-code; then
echo "No changes to commit."
exit 0
else
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "update"
git push origin main
fi
Step 5: Commit your change, then Github actions will run as your specified cron to update Articles into your README.md file
![]() |
AWS Lambda with Go - How to Build, Deploy, and...
Build, Deploy, and Invoke AWS Lambda Functions in Golang 1. Initialize Lambda...
20/08/2025
|
![]() |
Tracing error strack in Golang
Problem: No Stack Trace in Native Errors Consider this Go snippet: func function3()...
23/05/2025
|
A better pkg.go.dev
About pkgo.dev I have never been able to read a package's documentation on pkg.go.dev...
16/02/2025
|
|
Pod Topology Spread Constraints
Pod Topology Spread Constraints Pod Topology Spread Constraints - a.k.a...
12/01/2025
|
|
![]() |
Avoid Misunderstanding ON DELETE NO ACTION
Relational databases often provide several options for handling actions when a referenced row in a...
06/10/2024
|
- AWS Lambda with Go - How to Build, Deploy, and... - 20/08/2025
- Tracing error strack in Golang - 23/05/2025
- A better pkg.go.dev - 16/02/2025
- Pod Topology Spread Constraints - 12/01/2025
- Avoid Misunderstanding ON DELETE NO ACTION - 06/10/2024
Updated at: 2025-09-15T12:57:09Z