Skip to content

Dump GLVD Postgres Snapshot #29

Dump GLVD Postgres Snapshot

Dump GLVD Postgres Snapshot #29

name: Dump GLVD Postgres Snapshot
on:
workflow_dispatch:
jobs:
dump-db-snapshot:
runs-on: ubuntu-latest
container: ghcr.io/gardenlinux/glvd:edge
env:
PGUSER: glvd
PGDATABASE: glvd
PGPASSWORD: glvd
PGHOST: postgres
PGPORT: 5432
services:
postgres:
image: ghcr.io/gardenlinux/glvd-postgres:edgenotls
env:
POSTGRES_USER: glvd
POSTGRES_DB: glvd
POSTGRES_PASSWORD: glvd
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Ingest Data
run: /usr/local/src/ingest-postgres.sh
- run: |
echo "$PGHOST:$PGPORT:$PGDATABASE:$PGUSER:$PGPASSWORD" > ~/.pgpass
chmod 0600 ~/.pgpass
- run: psql glvd -f extra-schema.sql
- name: Dump Database Snapshot
run: |
pg_dump -h postgres -p 5432 -U glvd glvd > glvd.sql
- uses: actions/upload-artifact@v4
with:
name: glvd.sql
path: glvd.sql
retention-days: 2