Earn Stack Overflow's Fanatic Badge automagically using GitHub Actions π
Fanatic: Visit the site each day for 100 consecutive days. (Days are counted in UTC.).
Not just for Stack Overflow. Should work with any StackExchange site that has a Fanatic Badge.
You need to set a password for Stack Overflow.
STACKOVERFLOW_EMAIL
STACKOVERFLOW_PASSWORD
ALTERNATIVE_URL
(e.g. https://superuser.com
or https://serverfault.com/
)Once the setup has been completed then the workflow will run daily at 1am UTC, log into your Stack Overflow profile and record your Fanatic Badge progress.
There shouldn't be a need to monitor the workflow but if you look at the workflow logs or artifacts (screenshots) you can see the progress.
Sometime after you've earned the Fanatic Badge the scheduled workflow will stop running.
Yes, but it was fun to make.
No good reason of course.
I accidentally earned the Enthusiast Badge for visiting Stack Overflow for 30 consecutive days (how sad π€)
I then hoped to earn the Fanatic Badge but I decided to not do any coding for one day (unforgivable π€¦ββοΈ) and lost my progress π
I found this Meta Stack overflow question on writing a program to earn the Fanatic Badge. Other people have done this before but they all required deploying to some infrastructure like Heroku or AWS. I asked myself "Could this be done with GitHub Actions?" to which the answer seems to be "Yes, technically".
It was also a good excuse to give Playwright a go.
Maybe. Maybe not.
According to the GitHub Additional Product Terms:
for example, don't use Actions ... as part of a serverless application
But then it goes on to say:
but a low benefit Action could be ok if itβs also low burden
And I would argue that this is low burden.
There are other repos such as upptime acting in a serverless application manner of far greater burden that seem to not get into any trouble.
To prevent the scheduled workflow from being disabled automatically after 60 days of repository inactivity the workflow will push some changes to the repo after 42 days. 60 days later GitHub will disable the workflow which will be after you've earned your Fanatic Badge on day 100.
Warning: To prevent unnecessary workflow runs, scheduled workflows may be disabled automatically. When a public repository is forked, scheduled workflows are disabled by default. In a public repository, scheduled workflows are automatically disabled when no repository activity has occurred in 60 days.