Compare commits

...

1 Commits

Author SHA1 Message Date
Elliot DeNolf
5671179132 ci: add custom restore build action 2023-11-07 21:33:36 -05:00
2 changed files with 26 additions and 75 deletions

View File

@@ -0,0 +1,21 @@
name: Restore build cache
description: Installes node, pnpm, and restores the build cache
runs:
using: composite
steps:
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Restore build
uses: actions/cache@v3
with:
path: ./*
key: ${{ github.sha }}-${{ github.run_number }}

View File

@@ -92,22 +92,8 @@ jobs:
POSTGRES_DB: payloadtests
steps:
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Restore build
uses: actions/cache@v3
with:
path: ./*
key: ${{ github.sha }}-${{ github.run_number }}
uses: actions/restore-build-cache@v1
- name: Start PostgreSQL
uses: CasperWA/postgresql-action@v1.2
@@ -145,22 +131,8 @@ jobs:
part: [1/4, 2/4, 3/4, 4/4]
steps:
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Restore build
uses: actions/cache@v3
with:
path: ./*
key: ${{ github.sha }}-${{ github.run_number }}
uses: actions/restore-build-cache@v1
- name: E2E Tests
uses: nick-fields/retry@v2
@@ -182,22 +154,8 @@ jobs:
needs: core-build
steps:
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Restore build
uses: actions/cache@v3
with:
path: ./*
key: ${{ github.sha }}-${{ github.run_number }}
uses: actions/restore-build-cache@v1
- name: Generate Payload Types
run: pnpm dev:generate-types fields
@@ -222,22 +180,8 @@ jobs:
- live-preview-react
steps:
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Restore build
uses: actions/cache@v3
with:
path: ./*
key: ${{ github.sha }}-${{ github.run_number }}
uses: actions/restore-build-cache@v1
- name: Build ${{ matrix.pkg }}
run: pnpm turbo run build --filter=${{ matrix.pkg }}
@@ -258,22 +202,8 @@ jobs:
- plugin-sentry
steps:
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Restore build
uses: actions/cache@v3
with:
path: ./*
key: ${{ github.sha }}-${{ github.run_number }}
uses: actions/restore-build-cache@v1
- name: Build ${{ matrix.pkg }}
run: pnpm turbo run build --filter=${{ matrix.pkg }}