name: "Setup Bun"
description: "Setup Bun with caching and install dependencies"
runs:
  using: "composite"
  steps:
    - name: Mount Bun Cache
      if: ${{ runner.os == 'Linux' }}
      uses: useblacksmith/stickydisk@v1
      with:
        key: ${{ github.repository }}-bun-cache-${{ runner.os }}
        path: ~/.bun

    - name: Setup Bun
      uses: oven-sh/setup-bun@v2
      with:
        bun-version-file: package.json

    - name: Install dependencies
      run: bun install
      shell: bash
