ci: centralize bun setup to reduce duplication and improve caching

This commit is contained in:
Dax Raad
2025-10-12 00:46:37 -04:00
parent 24a5b16af8
commit 3ad6f84adb
9 changed files with 28 additions and 55 deletions

20
.github/actions/setup-bun/action.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: "Setup Bun"
description: "Setup Bun with caching and install dependencies"
runs:
using: "composite"
steps:
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Cache ~/.bun
id: cache-bun
uses: actions/cache@v4
with:
path: ~/.bun
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lockb', 'bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
run: bun install
shell: bash