From 0aa0c7f1aa06b08d2e8a17fe958bcfad018db37e Mon Sep 17 00:00:00 2001 From: Chris Gavin Date: Sun, 23 Aug 2026 08:21:59 +1000 Subject: [PATCH] Setup a writable gcloud SDK before installing Spanner emulator component gcloud components install fails on self-hosted runners with: ERROR: (gcloud.components.install) You cannot perform this action because you do not have permission to modify the Google Cloud SDK installation directory [/usr/local/google-cloud-sdk]. The runner's pre-baked gcloud SDK at /usr/local/google-cloud-sdk isn't writable by the job's user, so any component install there fails regardless of which component. Other workflows in this repo (e.g. beam_CleanUpGCPResources.yml) work around this by running google-github-actions/setup-gcloud first, which provisions its own writable SDK copy instead of relying on the runner's baked-in one. --- .github/workflows/beam_PreCommit_Go.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/beam_PreCommit_Go.yml b/.github/workflows/beam_PreCommit_Go.yml index c7848948f4c5..3f24dbce4c6b 100644 --- a/.github/workflows/beam_PreCommit_Go.yml +++ b/.github/workflows/beam_PreCommit_Go.yml @@ -85,6 +85,8 @@ jobs: with: java-version: default go-version: default + - name: Setup gcloud + uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db - name: Install Cloud Spanner emulator run: gcloud components install cloud-spanner-emulator --quiet - name: run goPreCommit script