Some time ago, I wrote a DEV.to article about reclaiming disk space in GitHub Actions:
Squeezing Disk Space from GitHub Actions Runners: An Engineer's Guide 🚀🧹💾
tl;dr GitHub Action runners come preloaded with a lot of useful software that—well—might not be useful for your use case at all.
Reusable GitHub Action ⚙️
I’ve published a reusable GitHub Action to help you clean up unnecessary tools, packages, and caches—and free up valuable disk space during your CI runs.
➡️ Check it out on GitHub Marketplace:
https://github.com/marketplace/actions/runner-cleanup-action
➡️ Use it in your GHA workflow:
- uses: mathio/gha-cleanup@v1
with:
remove-browsers: true # or false if you need to run tests or automation in browser
verbose: true # or false if you do not care about logs
For full documentation and source code, visit my GitHub repository:
Top comments (2)
Simple and very useful. Bookmarked! 👌👌
Looks useful! Thanks for publishing it!