[Feature]: Problems randomEmoji in Templates
eryajf opened this issue ยท 5 comments
Describe the bug
When I used randomEmoji in multiple feed templates, they got the same results.
Expected behavior
I hope that different feeds will get different results.
Screenshots
Workflow Yml Used
name: Latest blog post workflow
on:
schedule: # Run workflow automatically
- cron: '0 * * * *' # Runs every hour, on the hour
workflow_dispatch: # Run workflow manually (without waiting for the cron to be called), through the Github Actions Workflow page directly
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@v2
- name: Pull in dev.to posts
uses: gautamkrishnar/blog-post-workflow@v1
with:
max_post_count: 3
committer_username: "eryajf"
committer_email: "eryajf@163.com"
feed_list: "https://wiki.eryajf.net/rss.xml"
template: "$newline- $randomEmoji(๐ฏ,๐ฅ,๐ซ,๐,๐ฎ,๐,๐ฅณ,๐ป,๐งฐ,๐,๐ฅฐ,๐ง,๐ค,๐,๐ฅธ,๐คฉ,๐ค,๐ค,๐ซฃ,๐คญ,๐ค ,๐น,๐บ,๐คก,๐ค,๐,๐บ,๐ซถ,๐,๐ช,๐,๐,๐ง ,๐งโ๐ซ,๐จโ๐ซ,๐,๐งโ๐ป,๐ฅท,๐,๐ด,๐ผ,๐,๐ป,๐ต,๐,๐ฆ,๐ฆ,๐ฆ
,๐ฆ,๐ฆฃ,๐,๐ฆ,๐ฆ,๐,๐ฆฉ,๐ฒ,๐,๐,๐,๐,๐,๐ฌ,๐ญ,๐,๐ฆ,โฝ๏ธ,๐ฝ,๐ก,๐,๐,๐ก,๐ฏ,๐ช,๐งฐ,โ๏ธ,๐ญ,๐ช,๐,๐,) [$title]($url) $newline"
- name: Pull in dev.to posts
uses: gautamkrishnar/blog-post-workflow@v1
with:
max_post_count: 3
committer_username: "eryajf"
committer_email: "eryajf@163.com"
comment_tag_name: "DecoHack"
feed_list: "https://www.decohack.com/feed"
template: "$newline- $randomEmoji(๐ฏ,๐ฅ,๐ซ,๐,๐ฎ,๐,๐ฅณ,๐ป,๐งฐ,๐,๐ฅฐ,๐ง,๐ค,๐,๐ฅธ,๐คฉ,๐ค,๐ค,๐ซฃ,๐คญ,๐ค ,๐น,๐บ,๐คก,๐ค,๐,๐บ,๐ซถ,๐,๐ช,๐,๐,๐ง ,๐งโ๐ซ,๐จโ๐ซ,๐,๐งโ๐ป,๐ฅท,๐,๐ด,๐ผ,๐,๐ป,๐ต,๐,๐ฆ,๐ฆ,๐ฆ
,๐ฆ,๐ฆฃ,๐,๐ฆ,๐ฆ,๐,๐ฆฉ,๐ฒ,๐,๐,๐,๐,๐,๐ฌ,๐ญ,๐,๐ฆ,โฝ๏ธ,๐ฝ,๐ก,๐,๐,๐ก,๐ฏ,๐ช,๐งฐ,โ๏ธ,๐ญ,๐ช,๐,๐,) [$title]($url) $newline"
@eryajf just released a new version with this feature, please use the following yaml code:
on:
schedule: # Run workflow automatically
- cron: '0 * * * *' # Runs every hour, on the hour
workflow_dispatch: # Run workflow manually (without waiting for the cron to be called), through the Github Actions Workflow page directly
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@v2
- name: Pull in dev.to posts
uses: gautamkrishnar/blog-post-workflow@v1
with:
max_post_count: 3
committer_username: "eryajf"
committer_email: "eryajf@163.com"
feed_list: "https://wiki.eryajf.net/rss.xml"
rand_seed: "seed1"
template: "$newline- $randomEmoji(๐ฏ,๐ฅ,๐ซ,๐,๐ฎ,๐,๐ฅณ,๐ป,๐งฐ,๐,๐ฅฐ,๐ง,๐ค,๐,๐ฅธ,๐คฉ,๐ค,๐ค,๐ซฃ,๐คญ,๐ค ,๐น,๐บ,๐คก,๐ค,๐,๐บ,๐ซถ,๐,๐ช,๐,๐,๐ง ,๐งโ๐ซ,๐จโ๐ซ,๐,๐งโ๐ป,๐ฅท,๐,๐ด,๐ผ,๐,๐ป,๐ต,๐,๐ฆ,๐ฆ,๐ฆ
,๐ฆ,๐ฆฃ,๐,๐ฆ,๐ฆ,๐,๐ฆฉ,๐ฒ,๐,๐,๐,๐,๐,๐ฌ,๐ญ,๐,๐ฆ,โฝ๏ธ,๐ฝ,๐ก,๐,๐,๐ก,๐ฏ,๐ช,๐งฐ,โ๏ธ,๐ญ,๐ช,๐,๐) [$title]($url) $newline"
- name: Pull in dev.to posts
uses: gautamkrishnar/blog-post-workflow@v1
with:
max_post_count: 3
committer_username: "eryajf"
committer_email: "eryajf@163.com"
comment_tag_name: "DecoHack"
feed_list: "https://www.decohack.com/feed"
rand_seed: "seed2"
template: "$newline- $randomEmoji(๐ฏ,๐ฅ,๐ซ,๐,๐ฎ,๐,๐ฅณ,๐ป,๐งฐ,๐,๐ฅฐ,๐ง,๐ค,๐,๐ฅธ,๐คฉ,๐ค,๐ค,๐ซฃ,๐คญ,๐ค ,๐น,๐บ,๐คก,๐ค,๐,๐บ,๐ซถ,๐,๐ช,๐,๐,๐ง ,๐งโ๐ซ,๐จโ๐ซ,๐,๐งโ๐ป,๐ฅท,๐,๐ด,๐ผ,๐,๐ป,๐ต,๐,๐ฆ,๐ฆ,๐ฆ
,๐ฆ,๐ฆฃ,๐,๐ฆ,๐ฆ,๐,๐ฆฉ,๐ฒ,๐,๐,๐,๐,๐,๐ฌ,๐ญ,๐,๐ฆ,โฝ๏ธ,๐ฝ,๐ก,๐,๐,๐ก,๐ฏ,๐ช,๐งฐ,โ๏ธ,๐ญ,๐ช,๐,๐) [$title]($url) $newline"
Thank you, this is possible. I would like to know what the current default value "username/repository" refers to and whether it is possible to change this default value to a timestamp, so that this parameter does not need to be configured by default.
@eryajf setting it as a timestamp value is a bad idea. It will update your repository every 5 minutes. That's why it is better to keep it as a static value. Using different static values gives different results. By default, if you don't give rand_seed argument, it will default to username/repository
-> in your case eryajf/eryajf
. This will make workflow generate unique random emojis for every user which is using it.
see: https://github.com/eryajf/read-list
In fact, I want to use this project to make a repository for reading lists, so at this time I need to set different values for different blogs, so at this time, if the default value is the timestamp of the project runtime, I don't have to care about this configuration item anymore. Similarly, even in personal warehouses, the use of timestamps is a matter of no effect.
Of course, what I write manually now can meet my needs. I just hope this place can be more elegant.