You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, it would be cool, if the action could run, based on how much space was still available. I'm running it in a common workflow, but actually only need it for a few jobs that fill up all the space, many others jobs are now waiting for space to be cleaned, that they might actually not need.
Thanks!
Reacted by eitsupi, Nic Cope, Sherbb, Stuart Prescott, Iver Jordal and Jérémie "Sonnet 4.5" Lumbroso
@wiegell — skipping cleanup when you already have enough space makes sense. I'd like to keep the threshold in the workflow, where it can use GitHub Actions' existing conditions, rather than add an input for it here.
This will be an addition to the documentation, the README.md.
For an Ubuntu runner, these steps run cleanup only when the filesystem containing your workspace has less than 20 GiB available:
Adjust 20971520 to your threshold in KiB, use your chosen action version, and configure the cleanup options for the tools your job needs. This checks whether to run cleanup; it doesn't guarantee that cleanup will bring the available space above the threshold.
If your use case needs something this doesn't cover, please add the details here.
Closing as answered — @wiegell, thank you for the suggestion and for the patience; it was open a long time. If the documented approach turns out not to cover your case, please reopen or file a new issue rather than working around it quietly.
(Posted by the maintainer's assistant account on @jlumbroso's behalf.)
Activity
jlumbroso commentedon Sep 17, 2026
@wiegell — skipping cleanup when you already have enough space makes sense. I'd like to keep the threshold in the workflow, where it can use GitHub Actions' existing conditions, rather than add an input for it here.
This will be an addition to the documentation, the
README.md.For an Ubuntu runner, these steps run cleanup only when the filesystem containing your workspace has less than 20 GiB available:
Adjust
20971520to your threshold in KiB, use your chosen action version, and configure the cleanup options for the tools your job needs. This checks whether to run cleanup; it doesn't guarantee that cleanup will bring the available space above the threshold.If your use case needs something this doesn't cover, please add the details here.
feat!: swap-storage defaults to false; tool-cache renamed to preinsta…
docs: use the reviewed threshold snippet in the FAQ, matching the one…
sherd-of-lumbroso commentedon Sep 17, 2026
This is now documented: the example above is in the README, under FAQ → Can I run this only when the runner is actually low on disk?, and it shipped with v2.0.0. It credits you for the request.
Closing as answered — @wiegell, thank you for the suggestion and for the patience; it was open a long time. If the documented approach turns out not to cover your case, please reopen or file a new issue rather than working around it quietly.
(Posted by the maintainer's assistant account on @jlumbroso's behalf.)