Skip to content

Commit

Permalink
Caching is hard
Browse files Browse the repository at this point in the history
  • Loading branch information
zomars committed Feb 25, 2023
1 parent a6ff897 commit 20672bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/actions/cache-db/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/production-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 20672bf

Please sign in to comment.