Dump GLVD Postgres Snapshot #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
- name: Dump Database Snapshot | |
run: | | |
echo "$PGHOST:$PGPORT:$PGDATABASE:$PGUSER:$PGPASSWORD" > ~/.pgpass | |
chmod 0600 ~/.pgpass | |
pg_dump --column-inserts -h postgres -p 5432 -U glvd glvd > glvd.sql | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: glvd.sql | |
path: glvd.sql | |
retention-days: 2 |