From 11f8a77ce81264d31e50675c54d5a5c1b0d2166c Mon Sep 17 00:00:00 2001 From: Gaubee Date: Mon, 12 Jan 2026 12:21:34 +0800 Subject: [PATCH] fix(ci): preserve .turbo cache in self-hosted runners - Add -e .turbo -e '**/.turbo' to git clean commands - Enables incremental builds across CI runs on self-hosted runners --- .github/workflows/cd.yml | 5 +++-- .github/workflows/ci.yml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index c505ba098..c2fdad05f 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -48,13 +48,14 @@ jobs: git clone https://github.com/${{ github.repository }}.git . else # Self-hosted runners keep the workspace between runs; ensure clean checkout + # Preserve .turbo cache for incremental builds git reset --hard HEAD - git clean -fdx + git clean -fdx -e .turbo -e '**/.turbo' fi git fetch origin ${{ github.sha }} --depth=1 --tags git checkout -f ${{ github.sha }} git reset --hard HEAD - git clean -fdx + git clean -fdx -e .turbo -e '**/.turbo' - name: Determine channel id: channel diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd2de0410..8155eece1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,13 +20,14 @@ jobs: git clone --depth=1 https://github.com/${{ github.repository }}.git . else # Self-hosted runners keep the workspace between runs; ensure clean checkout + # Preserve .turbo cache for incremental builds git reset --hard HEAD - git clean -fdx + git clean -fdx -e .turbo -e '**/.turbo' fi git fetch origin ${{ github.event.pull_request.head.sha || github.sha }} --depth=1 git checkout -f ${{ github.event.pull_request.head.sha || github.sha }} git reset --hard HEAD - git clean -fdx + git clean -fdx -e .turbo -e '**/.turbo' - name: Detect changes id: changes