diff --git a/.github/workflows/publish-images.yml b/.github/workflows/publish-images.yml index f2de3ebe3..1c053792d 100644 --- a/.github/workflows/publish-images.yml +++ b/.github/workflows/publish-images.yml @@ -151,6 +151,14 @@ jobs: with: persist-credentials: false + - name: Reclaim runner disk for the agent image + if: matrix.service == 'agent' && matrix.platform == 'linux/amd64' + run: | + set -euo pipefail + sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc + docker system prune --all --force || true + df -h / + - name: Derive platform slug run: | set -euo pipefail diff --git a/.github/workflows/validate-images.yml b/.github/workflows/validate-images.yml index 4b20df160..2094085c5 100644 --- a/.github/workflows/validate-images.yml +++ b/.github/workflows/validate-images.yml @@ -103,6 +103,14 @@ jobs: with: persist-credentials: false + - name: Reclaim runner disk for the agent image + if: matrix.service == 'agent' && matrix.platform == 'linux/amd64' + run: | + set -euo pipefail + sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc + docker system prune --all --force || true + df -h / + - name: Set up Docker Buildx uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3