-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: compoiste steps to remove duplicated code
- Loading branch information
1 parent
414ab59
commit 1106339
Showing
2 changed files
with
33 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Prepare node_modules | ||
|
||
description: Install Dependencies using Bun. If cache hit, do nothing. | ||
|
||
inputs: | ||
root: | ||
description: |- | ||
An absolute path to the directory where contains package.json. | ||
Required | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- uses: actions/cache@v4 | ||
id: cache | ||
working-directory: ${{ inputs.root }} | ||
with: | ||
path: | | ||
~/.bun/install/cache | ||
${{ inputs.root }}/.next/cache | ||
key: ${{ runner.os }}-bun-cache-${{ hashFiles('bun.lockb') }} | ||
restore-keys: ${{ runner.os }}-bun-cache- | ||
- uses: oven-sh/setup-bun@v1 | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
with: | ||
bun-version: latest | ||
- name: Install dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
working-directory: ${{ inputs.root }} | ||
run: bun install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters