mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Consider OS release for pnpm cache in GH workflows (#19973)
This commit is contained in:
18
.github/actions/prepare/action.yml
vendored
18
.github/actions/prepare/action.yml
vendored
@@ -1,5 +1,5 @@
|
||||
name: Prepare
|
||||
description: Install and build the app
|
||||
description: Install dependencies and build the platform
|
||||
inputs:
|
||||
build:
|
||||
description: Build the production bundle of the platform
|
||||
@@ -10,7 +10,7 @@ inputs:
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
using: composite
|
||||
steps:
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v3
|
||||
@@ -24,19 +24,21 @@ runs:
|
||||
with:
|
||||
run_install: false
|
||||
|
||||
- name: Get pnpm store directory
|
||||
id: pnpm-cache
|
||||
- name: Get cache info
|
||||
id: cache-info
|
||||
shell: bash
|
||||
run: |
|
||||
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
|
||||
echo "os-release=$(node --eval 'console.log(os.release())')" >> $GITHUB_OUTPUT
|
||||
echo "pnpm-cache-dir=$(pnpm store path)" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: actions/cache@v3
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
path: ${{ steps.cache-info.outputs.pnpm-cache-dir }}
|
||||
key:
|
||||
${{ runner.os }}-${{ steps.cache-info.outputs.os-release }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
${{ runner.os }}-${{ steps.cache-info.outputs.os-release }}-pnpm-store-
|
||||
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
|
||||
Reference in New Issue
Block a user