DEV Community

Cover image for GitHub Runner Cleanup: A Reusable Action 🚀🧹💾
Matej Lednický
Matej Lednický

Posted on

GitHub Runner Cleanup: A Reusable Action 🚀🧹💾

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
Enter fullscreen mode Exit fullscreen mode

For full documentation and source code, visit my GitHub repository:

👉 mathio/gha-cleanup

Top comments (2)

Collapse
 
maxprilutskiy profile image
Max Prilutskiy

Simple and very useful. Bookmarked! 👌👌

Collapse
 
vrcprl profile image
Veronica Prilutskaya 🌱

Looks useful! Thanks for publishing it!