diff --git a/.github/workflows/test-migration.yml b/.github/workflows/test-migration.yml index 60f386d..0690069 100644 --- a/.github/workflows/test-migration.yml +++ b/.github/workflows/test-migration.yml @@ -14,6 +14,7 @@ jobs: POSTGRES_PASSWORD: "dMVZFeBWLOzYRV71" DB_USERNAME: "postgres" POSTGRES_DB: "postgres" + DB_BACKUP_URL: "https://storage.googleapis.com/anonymize-db-backups/us-west1/backup.sql" steps: - name: Checkout code @@ -40,7 +41,14 @@ jobs: - name: Start PostgreSQL container run: | - docker run -d --name $DB_HOST -e POSTGRES_USER:$DB_USERNAME -e POSTGRES_PASSWORD=$POSTGRES_PASSWORD -e POSTGRES_DB=$POSTGRES_DB -p 5432:5432 gcr.io/$GCP_PROEJCT_ID/$DB_HOST:latest + docker run -d --name $DB_HOST \ + -e POSTGRES_USER=$DB_USERNAME \ + -e POSTGRES_PASSWORD=$POSTGRES_PASSWORD \ + -e POSTGRES_DB=$POSTGRES_DB \ + -e RESTORE_FROM_BACKUP=True \ + -e DB_BACKUP_URL=$DB_BACKUP_URL + -p 5432:5432 \ + gcr.io/$GCP_PROEJCT_ID/$DB_HOST:latest - name: Install Sequelize CLI and dependencies run: |