RealPeha / This-Repo-Has-1750-Stars

Yes, it's true :purple_heart:
1.75k stars 17 forks source link

Maybe Github Actions? #4

Open szdytom opened 3 years ago

szdytom commented 3 years ago

If I am not badly wrong, you're running the script on your own computer. But what about at nights, or you had to reboot your computer for maintainance? Github Action is a better platfrom for such automated scripts, isn't it?

RealPeha commented 3 years ago

Everything is a little simpler, this script is just running on my server 🤓

suyanhanx commented 3 years ago

Everything is a little simpler, this script is just running on my server 🤓

you are so kind :smile:

hezhongfeng commented 3 years ago

哈哈哈哈 Good job.

ouuan commented 3 years ago

Here you are: https://github.com/ouuan/This-repo-has-x-stars-y-forks-action

I'm using it in my profile README.

OrenLeung commented 3 years ago

maybe serverless functions with webhook?

ouuan commented 3 years ago

maybe serverless functions with webhook?

https://github.com/iBug/This-Repo-Has-49-Stars

Aazerra commented 3 years ago

Here you are: https://github.com/ouuan/This-repo-has-x-stars-y-forks-action

I'm using it in my profile README.

this good but its updating a little bit slow

iBug commented 3 years ago

this good but its updating a little bit slow

If you want faster updates, you'll probably be better off with a serverless function and GitHub webhook as I wrote in my blog. I also left a small piece of demo Lambda code in my repository iBug/This-Repo-Has-N-Stars which you can take for reference. In my experiences, this approach takes just around 1 second to update the repo name (and description if also supplied).

AWS offers perpetual Free Tier for Lambda and 12-month Free Tier for API Gateway. Alternatively, Netlify also offers perpetual free serverless functions. Both of them are more than enough to get you started.

(Disclaimer: I'm not affiliated with either Amazon.com, Inc. or Netlify.)

rickygao commented 3 years ago

Wow, I think the idea is charming. I also implemented it in this repo. May be it is the simplest one? I also collect the above implementations into README.

Edit: sadly I found that unstar does not trigger a watch event for GitHub Actions. 😢