cal.pub0.org/.github/actions/cache-build/action.yml

24 lines
814 B
YAML
Raw Normal View History

2023-02-20 23:36:39 +00:00
name: Cache production build binaries
description: "Cache or restore if necessary"
inputs:
node_version:
required: true
description: "The node version used to run this"
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-2: ${{ hashFiles('apps/web/next.config.js') }}
with:
path: |
apps/web/.next
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 }}-