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 }}