2023-10-26 00:54:14 -06:00
|
|
|
name: setup bun
|
|
|
|
description: Setup bun and install dependencies
|
|
|
|
|
|
|
|
inputs:
|
|
|
|
working-directory:
|
2023-10-26 03:08:16 -06:00
|
|
|
description: 'working directory for bun install'
|
2023-10-26 00:54:14 -06:00
|
|
|
default: ./
|
|
|
|
required: false
|
|
|
|
|
|
|
|
runs:
|
|
|
|
using: composite
|
|
|
|
steps:
|
|
|
|
- name: Setup Bun
|
|
|
|
uses: oven-sh/setup-bun@v1
|
|
|
|
with:
|
|
|
|
bun-version: 1.0.4
|
|
|
|
|
|
|
|
- name: Cache dependencies
|
|
|
|
id: bun-cache
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
**/node_modules
|
|
|
|
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}-${{ hashFiles('**/package.json') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
|
|
|
|
${{ runner.os }}-bun-
|
|
|
|
|
|
|
|
- name: Install dependencies
|
2023-10-26 03:08:16 -06:00
|
|
|
working-directory: ${{ inputs.working-directory }}
|
2023-10-26 00:54:14 -06:00
|
|
|
if: steps.bun-cache.outputs.cache-hit != 'true'
|
|
|
|
run: bun install
|
|
|
|
shell: bash
|
|
|
|
|