Skip to content

Commit

Permalink
feat: create action
Browse files Browse the repository at this point in the history
  • Loading branch information
ManasC478 committed Sep 30, 2024
1 parent 8c3dae1 commit 42e92c5
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 12 deletions.
28 changes: 28 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Setup
description: "Setup Bun"

inputs:
os:
description: "Runner OS"
required: true

runs:
using: "composite"
steps:
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Cache Bun dependencies
uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: ${{ inputs.os }}-bun-${{ hashFiles('**/bun.lockb') }}
restore-keys: |
${{ inputs.os }}-bun-
- name: Install dependencies
run: |
cd server
bun install
15 changes: 3 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI
on:
push:
branches:
- '**' # currently run on all branches
- "**" # currently run on all branches
pull_request:
types: [opened, synchronize, reopened]

Expand All @@ -14,18 +14,9 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v1
- uses: ./.github/actions/setup
with:
bun-version: latest

- name: Cache Bun dependencies
uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
restore-keys: |
${{ runner.os }}-bun-
os: ${{ runner.os }}

- name: Install dependencies
run: |
Expand Down
Empty file added action.yml
Empty file.

0 comments on commit 42e92c5

Please sign in to comment.