Build fixes

pull/7267/head
zomars 2023-02-21 12:50:45 -07:00
parent 6790be6f8f
commit 8fdd71ae36
2 changed files with 7 additions and 20 deletions

View File

@ -1,22 +1,22 @@
name: Cache production build binaries
description: "Cache or restore if necessary"
inputs:
node_version:
required: true
description: "The node version used to run this"
env:
node_version: v16.x
runs:
using: "composite"
steps:
- name: Cache production build
id: prod-build-cache
uses: actions/cache@v3
env:
cache-name: prod-build
key-1: ${{ inputs.node_version }}-${{ hashFiles('yarn.lock') }}
key-1: ${{ env.node_version }}-${{ hashFiles('yarn.lock') }}
key-2: ${{ hashFiles('apps/web/next.config.js') }}
with:
path: |
apps/web/.next
node_modules/.cache/turbo
**/.turbo/**
**/dist/**
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}-

View File

@ -67,21 +67,8 @@ runs:
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/yarn-install
- name: Cache production build
- uses: ./.github/actions/cache-build
id: prod-build-cache
uses: actions/cache@v3
env:
cache-name: prod-build
key-1: ${{ env.node_version }}-${{ hashFiles('yarn.lock') }}
key-2: ${{ hashFiles('apps/web/next.config.js') }}
with:
path: |
apps/web/.next
node_modules/.cache/turbo
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}-
${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-
- name: Next.js production build
if: steps.prod-build-cache.outputs.cache-hit != 'true'
shell: bash