From 0d88761228192797c1a433090527663f20bd8c76 Mon Sep 17 00:00:00 2001 From: Julie Qiu Date: Thu, 19 Mar 2026 22:15:19 -0400 Subject: [PATCH] fix(workflows): create ~/.gemini before running Gemini CLI The Gemini CLI expects ~/.gemini/ to exist when saving its project registry. On a fresh GitHub Actions runner this directory is missing, causing an ENOENT error on rename of projects.json.tmp. The error text is written to stderr, which also triggers a "stderr was not valid JSON" warning because the action expects structured JSON there. Adding mkdir -p ~/.gemini before the action runs prevents both problems. --- .github/workflows/gemini-invoke.yml | 2 ++ .github/workflows/gemini-plan-execute.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/gemini-invoke.yml b/.github/workflows/gemini-invoke.yml index e3ba0cb43..278e6b2a4 100644 --- a/.github/workflows/gemini-invoke.yml +++ b/.github/workflows/gemini-invoke.yml @@ -23,6 +23,8 @@ jobs: steps: - name: 'Checkout Code' uses: 'actions/checkout@v6' + - name: 'Create Gemini config directory' + run: 'mkdir -p ~/.gemini' - name: 'Run Gemini CLI' id: 'run_gemini' uses: 'google-github-actions/run-gemini-cli@v0' diff --git a/.github/workflows/gemini-plan-execute.yml b/.github/workflows/gemini-plan-execute.yml index cbac9fdfd..c5509c32e 100644 --- a/.github/workflows/gemini-plan-execute.yml +++ b/.github/workflows/gemini-plan-execute.yml @@ -24,6 +24,8 @@ jobs: steps: - name: 'Checkout Code' uses: 'actions/checkout@v6' + - name: 'Create Gemini config directory' + run: 'mkdir -p ~/.gemini' - name: 'Run Gemini CLI' id: 'run_gemini' uses: 'google-github-actions/run-gemini-cli@v0'