* Testing * Update pr.yml * Update pr.yml * Update pr.yml * Update pr.yml * Update pr.yml * Update pr.yml * Update pr.yml * Update pr.yml * Update pr.yml * Update pr.yml * Update production-build.yml * Tests * Update production-build.yml * Update pr.yml * Update pr.yml * Update nextjs-bundle-analysis.yml * Update pr.yml * Update pr.yml * Update pr.yml * Update production-build.yml * Update pr.yml * Update pr.yml * Update pr.yml * Update pr.yml * test * Test * Revert * TEST * Update production-build.yml * Update production-build.yml * DRY * Fixes * Update action.yml * Update action.yml * Fixes * WIP * Update action.yml * Update action.yml * Abstract playwright cache * Update yarn-e2e.yml * Adds type check * Update pr.yml * Tests * Anotha one * Update action.yml * Update pr.yml * Update action.yml * Cleanup * Update package.json * Update yarn-e2e.yml * Test * Cleanup * Update check-types.yml * Update yarn-install.yml * Update yarn-install.yml * Update yarn-install.yml * Fixes * Fixes * Update pr.yml * Fixes * Removed required checks * WIP * Adjustments * Update action.yml * Update pr.yml * Comments out buildjet * Caches DB * Update lint.yml * Update action.yml * Update action.yml * Update action.yml * Upgrades actions/checkout@v3 * Build fixes * Update nextjs-bundle-analysis.yml * Update nextjs-bundle-analysis.yml * Update nextjs-bundle-analysis.yml * Fixes? * Inherit secrets * Re-enables buildjet * Adds missing build cache to e2e * Revert "Re-enables buildjet" This reverts commit badd655e1edf8c2942582439f9fd48c00f892c38. * Fixes build env * Revert "Revert "Re-enables buildjet"" This reverts commit a1d78e7c12618d14b23bd50540ee005c6a550e7b. * Update .github/actions/cache-db/action.yml * Define CODEOWNERS file (#7245) * Start defining CODEOWNERS file * Update CODEOWNERS --------- Co-authored-by: Omar López <zomars@me.com> * improved brand colors on booking page (#7269) --------- Co-authored-by: Alex van Andel <me@alexvanandel.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com>
35 lines
1.0 KiB
YAML
35 lines
1.0 KiB
YAML
name: Cache database between jobs
|
|
description: "Cache or restore if necessary"
|
|
inputs:
|
|
DATABASE_URL:
|
|
required: true
|
|
path:
|
|
required: false
|
|
default: "backups/backup.sql"
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Cache database
|
|
id: cache-db
|
|
uses: actions/cache@v3
|
|
env:
|
|
cache-name: cache-db
|
|
with:
|
|
path: ${{ inputs.path }}
|
|
key: ${{ runner.os }}-${{ env.cache-name }}-${{ inputs.path }}-${{ github.sha }}
|
|
restore-keys: |
|
|
${{ runner.os }}-${{ env.cache-name }}-${{ inputs.path }}-
|
|
- name: Postgres Dump Backup
|
|
if: steps.cache-db.outputs.cache-hit != 'true'
|
|
uses: tj-actions/pg-dump@v2.3
|
|
with:
|
|
database_url: ${{ inputs.DATABASE_URL }}
|
|
path: ${{ inputs.path }}
|
|
options: "-O"
|
|
- name: Postgres Backup Restore
|
|
if: steps.cache-db.outputs.cache-hit == 'true'
|
|
uses: tj-actions/pg-restore@v4.5
|
|
with:
|
|
database_url: ${{ inputs.DATABASE_URL }}
|
|
backup_file: ${{ inputs.path }}
|