From a6b10e3e877a609dd668774b9dcfb27e0c8dc2d1 Mon Sep 17 00:00:00 2001 From: Shoubhit Dash Date: Thu, 1 Oct 2026 18:36:05 +0530 Subject: [PATCH] fix(ci): stabilize bun cache keys (#52495) --- .github/actions/setup-bun/action.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-bun/action.yml b/.github/actions/setup-bun/action.yml index 9ed484673a1..e58cd04a516 100644 --- a/.github/actions/setup-bun/action.yml +++ b/.github/actions/setup-bun/action.yml @@ -45,14 +45,16 @@ runs: - name: Get cache directory id: cache shell: bash - run: echo "dir=$(bun pm cache)" >> "$GITHUB_OUTPUT" + run: | + echo "dir=$(bun pm cache)" >> "$GITHUB_OUTPUT" + echo "version=$(bun --version)" >> "$GITHUB_OUTPUT" - name: Restore Bun dependencies id: bun-cache uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: path: ${{ steps.cache.outputs.dir }} - key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }} + key: ${{ runner.os }}-${{ runner.arch }}-bun-${{ steps.cache.outputs.version }}-${{ hashFiles('bun.lock', 'patches/**') }} - name: Install setuptools for distutils compatibility run: python3 -m pip install setuptools || pip install setuptools || true @@ -75,4 +77,4 @@ runs: uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: path: ${{ steps.cache.outputs.dir }} - key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }} + key: ${{ steps.bun-cache.outputs.cache-primary-key }}