summaryrefslogtreecommitdiffhomepage
path: root/.github/actions/setup-bun/action.yml
blob: cba04faccefce3b2def948701b1e04c7f2edcdb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
name: "Setup Bun"
description: "Setup Bun with caching and install dependencies"
runs:
  using: "composite"
  steps:
    - name: Setup Bun
      uses: oven-sh/setup-bun@v2
      with:
        bun-version-file: package.json

    - name: Cache ~/.bun
      id: cache-bun
      uses: actions/cache@v4
      with:
        path: ~/.bun
        key: ${{ runner.os }}-bun-${{ hashFiles('package.json') }}-${{ hashFiles('bun.lockb', 'bun.lock') }}
        restore-keys: |
          ${{ runner.os }}-bun-${{ hashFiles('package.json') }}-

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