0
0
Fork 0
mirror of https://github.com/tj-actions/pg-dump.git synced 2024-12-20 01:18:49 +00:00
pg-dump/README.md
tj-actions[bot] f8978376ad
Upgraded to v3 (#137)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-09-12 13:12:20 -06:00

4 KiB

Codacy Badge CI Update release version. Public workflows that use this action.

pg-dump

Run pg_dump to generate a backup

Usage

Using the default PostgreSQL installed on the runner

...
    steps:
      - uses: actions/checkout@v2
      - name: Postgres Dump Backup
        uses: tj-actions/pg-dump@v3
        with:
          database_url: "postgres://test_user:test_user_password@localhost:5432/testdb"
          path: "backups/backup.sql" 
          options: "-O"   

Using a different PostgreSQL version

...
    steps:
      - uses: actions/checkout@v2
      - name: Postgres Dump Backup
        uses: tj-actions/pg-dump@v3
        with:
          database_url: "postgres://test_user:test_user_password@localhost:5432/testdb"
          postgresql_version: "15"  # Note: Only the major version is required e.g. 12, 14, 15
          path: "backups/backup.sql" 
          options: "-O"   

If you feel generous and want to show some extra appreciation:

Support this project with a

Buy me a coffee

Inputs

INPUT TYPE REQUIRED DEFAULT DESCRIPTION
database_url string true Database URL
options string true "-O" Extra options passed to pg_dump
path string true Backup file output location
postgresql_version string false Version of PostgreSQL. e.g 15

Credits

This package was created with Cookiecutter.

Report Bugs

Report bugs at https://github.com/tj-actions/pg-dump/issues.

If you are reporting a bug, please include:

  • Your operating system name and version.
  • Any details about your workflow that might be helpful in troubleshooting.
  • Detailed steps to reproduce the bug.