Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

Avoid unused Google Cloud tool-cache copies on hosted runners (#653)

Dee208b06df1c72
diff --git a/.github/actions/setup-gcloud/action.yml b/.github/actions/setup-gcloud/action.yml
index 384277c94..3275b7654 100644
--- a/.github/actions/setup-gcloud/action.yml
+++ b/.github/actions/setup-gcloud/action.yml
@@ -14,3 +14,6 @@ runs:
- uses: google-github-actions/setup-gcloud@v2
with:
skip_install: ${{ steps.installed.outputs.reusable }}
+ # A hosted runner discards its local tool cache after this job. Use the
+ # extracted SDK directly when a missing/broken installation needs setup.
+ skip_tool_cache: ${{ runner.environment == 'github-hosted' }}
diff --git a/.github/workflows/desktop-internal-build.yml b/.github/workflows/desktop-internal-build.yml
index 401291feb..2db65e375 100644
--- a/.github/workflows/desktop-internal-build.yml
+++ b/.github/workflows/desktop-internal-build.yml
@@ -166,6 +166,9 @@ jobs:
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }}
- uses: google-github-actions/setup-gcloud@e427ad8a34f8676edf47cf7d7925499adf3eb74f # v2
+ with:
+ # Avoid copying the SDK into a local cache this hosted job discards.
+ skip_tool_cache: ${{ runner.environment == 'github-hosted' }}
- name: Build once, publish both renderers and verify all four downloads
id: build
diff --git a/.github/workflows/release-desktop.yml b/.github/workflows/release-desktop.yml
index 4009b1051..2e3747146 100644
--- a/.github/workflows/release-desktop.yml
+++ b/.github/workflows/release-desktop.yml
@@ -280,6 +280,9 @@ jobs:
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }}
- uses: google-github-actions/setup-gcloud@v2
+ with:
+ # Avoid copying the SDK into a local cache this hosted job discards.
+ skip_tool_cache: ${{ runner.environment == 'github-hosted' }}
# SIGN_IDENTITY is read twice here: by publish-macos-variant.sh, re-signing the Intel build once
# it pins the renderer, and by upload-desktop.sh, signing the dmg.
diff --git a/docs/validation-and-release.md b/docs/validation-and-release.md
index 68b4ebf9d..8fdc1f390 100644
--- a/docs/validation-and-release.md
+++ b/docs/validation-and-release.md
@@ -74,6 +74,9 @@ if a build starts using another component. The existing pub-cache key also reads
`mobile/pubspec.lock`, which remains included so sparse and full checkouts restore
the same dependency cache. Linux builders reuse a working Google Cloud CLI at or
above the validated version, with the normal install path as a fallback.
+When installation is needed, hosted jobs use the extracted SDK directly instead
+of copying it into the runner's discarded local tool cache. Authentication still
+runs normally; self-hosted runners retain the upstream tool-cache behavior.
### Package Desktop while final checks run