Skip to content

Commit

Permalink
fix: convert workflow to an composite action
Browse files Browse the repository at this point in the history
  • Loading branch information
Guz013 committed Jun 27, 2023
1 parent 6e6c3e9 commit 6cdafc3
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 55 deletions.
52 changes: 52 additions & 0 deletions .github/actions/pnpm-setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "PNPM Setup"

inputs:
node-version:
required: false
type: number
default: 18
pnpm-version:
required: false
type: number
default: 8
install-deps:
required: false
type: boolean
default: true

runs:
using: "composite"
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node-version }}

- name: Install PNPM
uses: pnpm/action-setup@v2
id: pnpm-install
with:
version: ${{ inputs.pnpm-version }}
run_install: false

- name: Get store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys:
${{ runner.os }}-pnpm-store-

- name: Install dependencies
if: inputs.install-deps
run: pnpm install
shell: bash
55 changes: 0 additions & 55 deletions .github/workflows/pnpm-setup.yml

This file was deleted.

0 comments on commit 6cdafc3

Please sign in to comment.