-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
43 lines (39 loc) · 1.21 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: 'Setup Github Actions'
description: 'Setup Github Actions CI environment for Prezly projects'
inputs:
node:
description: 'Node version to setup'
default: '16'
pnpm:
description: 'pnpm version to setup'
default: '8.4.0'
runs:
using: "composite"
steps:
- name: Setup Node.js v${{ inputs.node }}
uses: actions/setup-node@v1
if: ${{ inputs.node }}
with:
node-version: ${{ inputs.node }}
- name: Setup pnpm v${{ inputs.pnpm }}
id: pnpm-setup
uses: pnpm/action-setup@v2
if: ${{ inputs.pnpm }}
with:
version: ${{ inputs.pnpm }}
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
if: ${{ inputs.pnpm }}
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Initialize pnpm cache
if: ${{ inputs.pnpm }}
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-${{ hashFiles('**/package.json') }}-
${{ runner.os }}-pnpm-store-