Skip to content
Source
Sign inSign up

action.yaml

48 lines1.7 KB

1name: Setup
2description: Perform standard setup and install dependencies using pnpm.
3inputs:
4 node-version:
5 description: The version of Node to install
6 required: false
7 deno-version:
8 description: The version of Deno to install
9 required: false
10 bun-version:
11 description: The version of Bun to install
12 required: false
13​
14runs:
15 using: composite
16 steps:
17 - name: Install pnpm
18 uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6
19 env:
20 npm_config_audit: "false"
21 npm_config_fund: "false"
22 # `pnpm self-update` downloads the 47 MB @pnpm/linux-x64 tarball; keep in sync with pnpm-workspace.yaml
23 pnpm_config_fetch_timeout: "180000"
24 - name: Install node
25 uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
26 with:
27 node-version: ${{ inputs.node-version || '26.12.1' }}
28 package-manager-cache: ${{ env.NSC_CONTAINER_REGISTRY == '' }}
29 cache: ${{ env.NSC_CONTAINER_REGISTRY == '' && 'pnpm' || '' }}
30 cache-dependency-path: pnpm-lock.yaml
31 - name: Configure pnpm cache
32 if: ${{ env.NSC_CONTAINER_REGISTRY != '' }}
33 uses: namespacelabs/nscloud-cache-action@c5f8dab7560444c4bf8dbc64f1b203431873c547 # v1.6.1
34 with:
35 cache: pnpm
36 - name: Install deno
37 uses: denoland/setup-deno@22d081ff2d3a40755e97629de92e3bcbfa7cf2ed # v2
38 if: ${{ inputs.deno-version != '' }}
39 with:
40 deno-version: ${{ inputs.deno-version }}
41 - name: Install bun
42 uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
43 if: ${{ inputs.bun-version != '' }}
44 with:
45 bun-version: ${{ inputs.bun-version }}
46 - name: Install dependencies
47 shell: bash
48 run: pnpm install