Caching is hard

This commit is contained in:
zomars 2023-02-25 09:00:51 -07:00
parent a6ff8974a4
commit 20672bfbc8
2 changed files with 4 additions and 3 deletions

View File

@ -15,11 +15,12 @@ runs:
uses: actions/cache@v3
env:
cache-name: cache-db
key-1: ${{ hashFiles('packages/prisma/**') }}
with:
path: ${{ inputs.path }}
key: ${{ runner.os }}-${{ env.cache-name }}-${{ inputs.path }}-${{ github.sha }}
key: ${{ runner.os }}-${{ env.cache-name }}-${{ inputs.path }}-${{ env.key-1 }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-${{ inputs.path }}-${{ github.sha }}
${{ runner.os }}-${{ env.cache-name }}-${{ inputs.path }}-${{ env.key-1 }}-${{ github.sha }}
- name: Postgres Dump Backup
if: steps.cache-db.outputs.cache-hit != 'true'
uses: tj-actions/pg-dump@v2.3

View File

@ -22,8 +22,8 @@ jobs:
id: cache-db
- uses: ./.github/actions/yarn-install
- uses: ./.github/actions/cache-build
- uses: ./.github/actions/env-read-file
id: cache-build
- uses: ./.github/actions/env-read-file
- run: yarn db-seed
if: steps.cache-db.outputs.cache-hit != 'true'
- run: yarn build