Increasing GitHub Actions Disk Space
A couple of days ago, all of the sudden, my jobs started running out of space.
I like to keep my GitHub clean. I delete forks I’m not using anymore, move old abandoned repositories to my graveyard and etc.
I don’t like to delete things manually though.
I assume I can just delete forks that match all these rules:
So, I was basically looking over the repository list and manually going to the fork settings, copying the name of the repo, pasting in the delete popup and etc.
Doing that from time to time is really boring.
So, I wrote a tool for that - in 2016. Yes, 2 years ago already.
Anyway, it does all the checks mentioned above, plus, you can customize the inactivity time (e.g. 1d
instead of 1m
), blacklist repos and include or not private forks.
You can install it On macOS:
$ brew install fork-cleaner
or on Linux:
$ snap install fork-cleaner
You’ll need a GitHub token with the repo
scope, you can create one in the settings page.
You can then either export it as the GITHUB_TOKEN
environment variable or using the --token
flag.
Then just run fork-cleaner
:
$ fork-cleaner
3 forks to delete:
--> https://github.com/caarlos0/coinmarketcap-exporter
--> https://github.com/caarlos0/hugo-paper
--> https://github.com/caarlos0/prometheus_couchbase_exporter
Remove the above listed forks? (y/n) [n]:
Then you just need to accept or not. Waaay faster than doing it manually.
Hope it helps keeping you account clean as well 🤘