Skip to content

Cronjob

Cronjob #63924

Workflow file for this run

name: "Cronjob"
on:
schedule:
- cron: '*/5 * * * *'
push:
branches:
- 'main'
jobs:
update-readme-with-blog:
name: Update this repo's README with latest blog posts
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Pull in eplus.dev posts
uses: ePlus-DEV/[email protected]
with:
retry_count: 2
feed_list: "https://eplus.dev/rss.xml"
committer_email: "[email protected]"
commit_message: Get blog posts
readme_path: ./profile/templates/README.md.tpl
rand_seed: "hoangsvit"
date_format: 'UTC: yyyy-mm-dd'
template: "- $randomEmoji(๐Ÿ’ฏ,๐Ÿ”ฅ,๐Ÿ’ซ,๐Ÿš€,๐ŸŒฎ,๐Ÿ“,๐Ÿฅณ,๐Ÿ’ป,๐Ÿงฐ,๐ŸŠ,๐Ÿฅฐ,๐Ÿง,๐Ÿค“,๐Ÿ˜Ž,๐Ÿฅธ,๐Ÿคฉ,๐Ÿค—,๐Ÿค”,๐Ÿซฃ,๐Ÿคญ,๐Ÿค ,๐Ÿ‘น,๐Ÿ‘บ,๐Ÿคก,๐Ÿค–,๐ŸŽƒ,๐Ÿ˜บ,๐Ÿซถ,๐Ÿ‘,๐Ÿ’ช,๐Ÿ’„,๐Ÿ‘€,๐Ÿง ,๐Ÿง‘โ€๐Ÿซ,๐Ÿ‘จโ€๐Ÿซ,๐Ÿ’‚,๐Ÿง‘โ€๐Ÿ’ป,๐Ÿฅท,๐Ÿ’ƒ,๐Ÿ•ด,๐Ÿ’ผ,๐ŸŽ“,๐Ÿป,๐Ÿต,๐Ÿ™‰,๐Ÿฆ„,๐Ÿฆ†,๐Ÿฆ…,๐Ÿฆ,๐Ÿฆฃ,๐Ÿ˜,๐Ÿฆ’,๐Ÿฆ,๐ŸŽ,๐Ÿฆฉ,๐Ÿฒ,๐ŸŒ,๐ŸŒœ,๐ŸŒ,๐ŸŒˆ,๐ŸŒŠ,๐ŸŽฌ,๐ŸŽญ,๐Ÿš€,๐Ÿšฆ,โ›ฝ๏ธ,๐Ÿ—ฝ,๐ŸŽก,๐ŸŒ‹,๐ŸŒ,๐Ÿ’ก,๐Ÿ•ฏ,๐Ÿชœ,๐Ÿงฐ,โš—๏ธ,๐Ÿ”ญ,๐Ÿช„,๐ŸŽŠ,๐ŸŽ‰) [$title]($url) -$date $newline"
max_post_count: 15
update-weather:
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '1.21.0'
- name: Prepare
run: |
export PATH=$PATH:$(go env GOPATH)/bin
mkdir profile/.tmp
- name: Collect weathers
run: |
go install github.com/ePlus-DEV/[email protected]
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'
- name: Merge templates
run: |
git pull
go install github.com/ePlus-DEV/[email protected]
merge-templates profile/README.md 'profile/templates/README.md.tpl' 'profile/.tmp/weathers.md.tpl'
- name: Commit
run: |
git config user.name "David Nguyen"
git config user.email [email protected]
git add .
git commit -m "update README.md ($(TZ="Asia/Ho_Chi_Minh" date +'%Y-%m-%d %H:%M:%S'))"
git push origin main