From 777895f8c669a9559fe6310829b9fcf9022c0dc8 Mon Sep 17 00:00:00 2001 From: Anthony Price Date: Mon, 27 Jul 2026 09:55:50 +0100 Subject: [PATCH 1/4] Compressing artefacts Added steps to compress and upload artefacts in the workflow. --- .github/workflows/gemini-review.yml | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/workflows/gemini-review.yml b/.github/workflows/gemini-review.yml index d18d3994..772908db 100644 --- a/.github/workflows/gemini-review.yml +++ b/.github/workflows/gemini-review.yml @@ -122,3 +122,34 @@ jobs: "tools": {} } prompt: '${{ inputs.gemini_cli_prompt }}' + + - name: 'Compress and cleanup artifacts' + if: always() + run: | + # Remove large telemetry logs to reduce artifact size + if [ -f .gemini/telemetry.log ]; then + # Keep only last 1000 lines of telemetry + tail -n 1000 .gemini/telemetry.log > .gemini/telemetry.log.tmp + mv .gemini/telemetry.log.tmp .gemini/telemetry.log + fi + + # Remove any large temp files + find .gemini -type f -size +5M -delete + + # Compress the entire .gemini directory + if [ -d .gemini ]; then + tar -czf gemini-artifacts.tar.gz .gemini/ + # Calculate size + SIZE=$(du -h gemini-artifacts.tar.gz | cut -f1) + echo "Artifact compressed to: $SIZE" + fi + + - name: 'Upload Gemini Review Artifacts' + if: always() + uses: 'actions/upload-artifact@v4' + with: + name: 'gemini-review-artifacts' + path: 'gemini-artifacts.tar.gz' + retention-days: 5 + if-no-files-found: 'warn' + From 71ce4beaa35a5d1c729c70e3ad6195046271ad24 Mon Sep 17 00:00:00 2001 From: Anthony Price Date: Mon, 27 Jul 2026 10:58:48 +0100 Subject: [PATCH 2/4] Set upload_artifacts to false and limit log size --- .github/workflows/gemini-review.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gemini-review.yml b/.github/workflows/gemini-review.yml index 772908db..897f5644 100644 --- a/.github/workflows/gemini-review.yml +++ b/.github/workflows/gemini-review.yml @@ -84,7 +84,7 @@ jobs: google_api_key: '${{ secrets.GOOGLE_API_KEY }}' use_gemini_code_assist: '${{ vars.GOOGLE_GENAI_USE_GCA }}' use_vertex_ai: '${{ vars.GOOGLE_GENAI_USE_VERTEXAI }}' - upload_artifacts: '${{ vars.UPLOAD_ARTIFACTS }}' + upload_artifacts: 'false' workflow_name: 'gemini-review' github_pr_number: '${{ github.event.pull_request.number || github.event.issue.number }}' settings: |- @@ -95,7 +95,9 @@ jobs: "telemetry": { "enabled": true, "target": "local", - "outfile": ".gemini/telemetry.log" + "outfile": ".gemini/telemetry.log", + "maxLogSize": 52428800, + "maxLogLines": 10000 }, "mcpServers": { "github": { From ea1c820245ac6e69b05d8aadcf8e5c13098acd36 Mon Sep 17 00:00:00 2001 From: Anthony Price Date: Mon, 27 Jul 2026 11:05:47 +0100 Subject: [PATCH 3/4] Increase timeout for review job to 15 minutes --- .github/workflows/gemini-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gemini-review.yml b/.github/workflows/gemini-review.yml index 897f5644..e6528004 100644 --- a/.github/workflows/gemini-review.yml +++ b/.github/workflows/gemini-review.yml @@ -24,7 +24,7 @@ defaults: jobs: review: runs-on: 'ubuntu-latest' - timeout-minutes: 7 + timeout-minutes: 15 permissions: contents: 'read' id-token: 'write' From f28ab04318d19ff1e71a682c8e6b8c865bfaa2d9 Mon Sep 17 00:00:00 2001 From: Anthony Price Date: Mon, 27 Jul 2026 11:25:04 +0100 Subject: [PATCH 4/4] Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/workflows/gemini-review.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gemini-review.yml b/.github/workflows/gemini-review.yml index e6528004..3d121e97 100644 --- a/.github/workflows/gemini-review.yml +++ b/.github/workflows/gemini-review.yml @@ -126,7 +126,7 @@ jobs: prompt: '${{ inputs.gemini_cli_prompt }}' - name: 'Compress and cleanup artifacts' - if: always() + if: always() && vars.UPLOAD_ARTIFACTS != 'false' run: | # Remove large telemetry logs to reduce artifact size if [ -f .gemini/telemetry.log ]; then @@ -136,7 +136,9 @@ jobs: fi # Remove any large temp files - find .gemini -type f -size +5M -delete + if [ -d .gemini ]; then + find .gemini -type f -size +5M -delete + fi # Compress the entire .gemini directory if [ -d .gemini ]; then @@ -147,7 +149,7 @@ jobs: fi - name: 'Upload Gemini Review Artifacts' - if: always() + if: always() && vars.UPLOAD_ARTIFACTS != 'false' uses: 'actions/upload-artifact@v4' with: name: 'gemini-review-artifacts'