From b473cc88ebeabf606e0798ccd942180ed9a1f8b9 Mon Sep 17 00:00:00 2001 From: ssestak <126681667+ssestak@users.noreply.github.com> Date: Wed, 7 Oct 2026 09:06:48 +0200 Subject: [PATCH] android-cloud-check: SETUP_RUBY input to skip setup-ruby on runners that ship Ruby android-setup-environment already has a `ruby` switch, but the reusable workflow never forwarded it, so every caller runs ruby/setup-ruby. On the self-hosted mac runners that step fails before Java is even set up: setup-ruby writes its tool cache under /Users/runner, which the runner user cannot create (EACCES), while the image already ships Ruby on PATH. SETUP_RUBY (boolean, default true) keeps today's behaviour and lets the mac callers pass false. --- .github/workflows/android-cloud-check.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/android-cloud-check.yml b/.github/workflows/android-cloud-check.yml index 2193cd7..8646701 100644 --- a/.github/workflows/android-cloud-check.yml +++ b/.github/workflows/android-cloud-check.yml @@ -44,6 +44,11 @@ on: required: false type: string default: ubuntu-latest + SETUP_RUBY: + description: "Whether to install Ruby with ruby/setup-ruby (default). Set to false on runners whose image already ships Ruby, for example the self-hosted mac runners, where setup-ruby cannot create its tool cache" + required: false + type: boolean + default: true ANDROID_SDK_PACKAGES: description: "When set, installs the Android SDK in the job (android-actions/setup-android) with these sdkmanager packages, for runners whose image has no SDK, for example `platforms;android-36 build-tools;36.0.0 platform-tools`" required: false @@ -80,6 +85,7 @@ jobs: with: java_version: ${{ inputs.JAVA_VERSION }} java_distribution: ${{ inputs.JAVA_DISTRIBUTION }} + ruby: ${{ inputs.SETUP_RUBY }} gradle_cache_encryption_key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }} android_sdk_packages: ${{ inputs.ANDROID_SDK_PACKAGES }} kotlin_native_cache: ${{ inputs.KOTLIN_NATIVE_CACHE }}