From d1dd8ffcd9000fcf5499da6a9fe5aaf29fef57ac Mon Sep 17 00:00:00 2001 From: cynarAI <155274210+cynarAI@users.noreply.github.com> Date: Tue, 20 Oct 2026 10:34:47 +0200 Subject: [PATCH] Keep the Expo action's caches off the GitHub cache service (#219) The mobile OTA job uploaded the EAS CLI to the GitHub cache service because expo-github-action caches by default. Turn both of its caches off and have the Actions budget test reject the Expo action unless they are off. Claude-Session: https://claude.ai/code/session_01Wy1md9QE1ayJbDCwJ4vAQs Co-authored-by: Claude --- .github/workflows/ci.yml | 3 +++ .../updater/src/github-actions-budget.test.ts | 23 ++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b689f6..12c2572 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -477,6 +477,9 @@ jobs: eas-version: latest packager: pnpm token: ${{ secrets.EXPO_TOKEN }} + # Its default caches go to the GitHub cache service; keep them on the runner. + eas-cache: false + expo-cache: false - name: Install dependencies if: steps.ota.outputs.publish == 'true' && steps.expo_token.outputs.ready == 'true' run: pnpm install --frozen-lockfile diff --git a/infra/updater/src/github-actions-budget.test.ts b/infra/updater/src/github-actions-budget.test.ts index 06715ee..8e48dbc 100644 --- a/infra/updater/src/github-actions-budget.test.ts +++ b/infra/updater/src/github-actions-budget.test.ts @@ -13,7 +13,18 @@ const workflows = readdirSync(directory) return { name, text, - jobs: (parse(text) as { jobs: Record }).jobs, + jobs: ( + parse(text) as { + jobs: Record< + string, + { + "runs-on"?: unknown; + uses?: string; + steps?: Array<{ uses?: string; with?: Record }>; + } + >; + } + ).jobs, }; }); @@ -34,4 +45,14 @@ describe("GitHub Actions budget", () => { expect(text).not.toContain("type=gha"); expect(text).not.toContain("setup-gradle"); }); + + it.each(workflows)("$name turns off the Expo action's GitHub caches", ({ jobs }) => { + for (const job of Object.values(jobs)) { + for (const step of job.steps ?? []) { + if (!step.uses?.startsWith("expo/expo-github-action")) continue; + expect(step.with?.["eas-cache"], step.uses).toBe(false); + expect(step.with?.["expo-cache"], step.uses).toBe(false); + } + } + }); });