Skip to content

Commit

Permalink
ci: add missing setup action
Browse files Browse the repository at this point in the history
  • Loading branch information
trezy committed May 29, 2024
1 parent 4eee9d8 commit f9aee9b
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Install Project"
description: "Installs node, npm, and dependencies"
inputs:
node-version:
description: "Node.js version"
required: true
default: "18"
npm-version:
description: "npm version"
required: true
default: "8"
runs:
using: "composite"
steps:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node-version }}
registry-url: "https://registry.npmjs.org"
- name: Install npm
shell: bash
run: npm install -g npm@${{ inputs.npm-version }}
- name: Cache Dependencies
id: node-modules-cache
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-modules-
- name: Install Dependencies
if: steps.node-modules-cache.outputs.cache-hit != 'true'
shell: bash
run: npm ci

0 comments on commit f9aee9b

Please sign in to comment.