In this section, I will tell you the steps to make this script running in Github Actions. This method is more preferred by me as I don't need to make a new separated heroku account for deploying this script.
- Fork this repo (use desktop mode if you use mobile phone)
- Go to your repo's settings
- Open "Secrets" tab
- Add the variables as I have stated here into secret variables
- Press "Actions" tab
- Accept it
- Press the workflow, and press "Enable workflow".
- You're done. The script will be active from now on.
The script has been scheduled to run at 00.00 UTC in 1st and 15th of a month.
If you want to stop the switching for a certain app, remove the process type var of the respective vars and it won't be switched when the time comes. If you want to stop the scheduler completely, go to the repo's settings, press Actions tab, and disable it.If you want to switch more than 5 apps, you can do either one of these:
a. Import this repo and enable the Actions in the repo's settings
b. Make a new organization with your Github account and fork this repo there
Fill the variables in that new repo with your other apps. This method can be used infinitely for unlimited apps.