fix(dogfood/coder): run go clean cache at workspace shutdown (#18685)

The Go build cache has a tendency to accumulate and waste space
(typically in the realm of 10-70 GB). This change automatically cleans
up the cache on shutdown to prevent accumulation.
This commit is contained in:
Mathias Fredriksson
2025-07-01 17:22:26 +03:00
committed by GitHub
parent 6f2834f62a
commit 1158ca25bf
+4
View File
@@ -496,6 +496,10 @@ resource "coder_agent" "dev" {
#!/usr/bin/env bash
set -eux -o pipefail
# Clean up the Go build cache to prevent the home volume from
# accumulating waste and growing too large.
go clean -cache
# Clean up the unused resources to keep storage usage low.
#
# WARNING! This will remove: