Skip to content

Commit c19db28

Browse files
authored
fix(.github/workflows): create ~/.gemini before running Gemini CLI (#4697)
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.
1 parent 9829b52 commit c19db28

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

.github/workflows/gemini-invoke.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ jobs:
2323
steps:
2424
- name: 'Checkout Code'
2525
uses: 'actions/checkout@v6'
26+
- name: 'Create Gemini config directory'
27+
run: 'mkdir -p ~/.gemini'
2628
- name: 'Run Gemini CLI'
2729
id: 'run_gemini'
2830
uses: 'google-github-actions/run-gemini-cli@v0'

.github/workflows/gemini-plan-execute.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
steps:
2525
- name: 'Checkout Code'
2626
uses: 'actions/checkout@v6'
27+
- name: 'Create Gemini config directory'
28+
run: 'mkdir -p ~/.gemini'
2729
- name: 'Run Gemini CLI'
2830
id: 'run_gemini'
2931
uses: 'google-github-actions/run-gemini-cli@v0'

0 commit comments

Comments
 (0)