Skip to content

Commit 61fe158

Browse files
authored
update github action
1 parent b1e57ee commit 61fe158

2 files changed

Lines changed: 30 additions & 1 deletion

File tree

.github/workflows/update-readme.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,25 @@ on:
66
branches:
77
- 'main'
88
jobs:
9+
update-readme-with-blog:
10+
name: Update this repo's README with latest blog posts
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
- name: Pull in eplus.dev posts
16+
uses: ePlus-DEV/blog-post-workflow@v1.0.0
17+
with:
18+
retry_count: 2
19+
feed_list: "https://eplus.dev/rss.xml"
20+
committer_email: "h250694@gmail.com"
21+
commit_message: Get blog posts
22+
readme_path: ./profile/templates/README.md.tpl
23+
rand_seed: "hoangsvit"
24+
date_format: 'UTC: yyyy-mm-dd'
25+
template: "- $randomEmoji(💯,🔥,💫,🚀,🌮,📝,🥳,💻,🧰,🏊,🥰,🧐,🤓,😎,🥸,🤩,🤗,🤔,🫣,🤭,🤠,👹,👺,🤡,🤖,🎃,😺,🫶,👍,💪,💄,👀,🧠,🧑‍🏫,👨‍🏫,💂,🧑‍💻,🥷,💃,🕴,💼,🎓,🐻,🐵,🙉,🦄,🦆,🦅,🦍,🦣,🐘,🦒,🦏,🐎,🦩,🐲,🌝,🌜,🌏,🌈,🌊,🎬,🎭,🚀,🚦,⛽️,🗽,🎡,🌋,🌁,💡,🕯,🪜,🧰,⚗️,🔭,🪄,🎊,🎉) [$title]($url) -$date $newline"
26+
max_post_count: 15
27+
928
update-weather:
1029
permissions: write-all
1130
runs-on: ubuntu-latest
@@ -24,6 +43,7 @@ jobs:
2443
weather-forecast update-weather --days=3 --city="Ho Chi Minh City" --weather-api-key="${{ secrets.WEATHER_API_KEY }}" --template-file='profile/templates/weathers.md.tpl' --out-file='profile/.tmp/weathers.md.tpl'
2544
- name: Merge templates
2645
run: |
46+
git pull
2747
go install github.com/ePlus-DEV/merge-templates@v1.0.1
2848
merge-templates profile/README.md 'profile/templates/README.md.tpl' 'profile/.tmp/weathers.md.tpl'
2949
- name: Commit
@@ -32,4 +52,4 @@ jobs:
3252
git config user.email h250694@gmail.com
3353
git add .
3454
git commit -m "update README.md ($(TZ="Asia/Ho_Chi_Minh" date +'%Y-%m-%d %H:%M:%S'))"
35-
git push origin main
55+
git push origin main

profile/templates/README.md.tpl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@ ePlus.DEV
33

44
![](https://komarev.com/ghpvc/?username=ePlus-DEV&style=for-the-badge)
55

6+
### #Blog posts
7+
8+
<!-- BLOG-POST-LIST:START --><!-- BLOG-POST-LIST:END -->
9+
10+
<div align="right">
11+
Update by <a target="_blank" href="https://github.com/ePlus-DEV/blog-post-workflow">ePlus-DEV/blog-post-workflow</a>
12+
</div>
13+
14+
615
## Today's Weather Forecast in My Hometown
716

817
{{ template "weathers.md.tpl" }}

0 commit comments

Comments
 (0)