mirror of
https://github.com/tj-actions/pg-dump.git
synced 2024-12-20 01:18:49 +00:00
58 lines
2.9 KiB
Markdown
58 lines
2.9 KiB
Markdown
[](https://app.codacy.com/gh/tj-actions/pg-dump?utm_source=github.com\&utm_medium=referral\&utm_content=tj-actions/pg-dump\&utm_campaign=Badge_Grade_Settings)
|
|
[](https://github.com/tj-actions/pg-dump/actions/workflows/test.yml) [](https://github.com/tj-actions/pg-dump/actions/workflows/sync-release-version.yml) [](https://github.com/search?o=desc\&q=tj-actions+pg-dump+path%3A.github%2Fworkflows+language%3AYAML\&s=\&type=Code)
|
|
|
|
## pg-dump
|
|
|
|
Run [pg\_dump](https://www.postgresql.org/docs/9.6/app-pgdump.html) to generate a backup
|
|
|
|
## Usage
|
|
|
|
```yaml
|
|
...
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Postgres Dump Backup
|
|
uses: tj-actions/pg-dump@v2.3
|
|
with:
|
|
database_url: "postgres://test_user:test_user_password@localhost:5432/testdb"
|
|
path: "backups/backup.sql"
|
|
options: "-O"
|
|
```
|
|
|
|
If you feel generous and want to show some extra appreciation:
|
|
|
|
Support this project with a :star:
|
|
|
|
[![Buy me a coffee][buymeacoffee-shield]][buymeacoffee]
|
|
|
|
[buymeacoffee]: https://www.buymeacoffee.com/jackton1
|
|
|
|
[buymeacoffee-shield]: https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png
|
|
|
|
## Inputs
|
|
|
|
<!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->
|
|
|
|
| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
|
|
|--------------|--------|----------|---------|------------------------------------------------------------------------------------------------------------|
|
|
| database\_url | string | true | | Database URL |
|
|
| options | string | true | `"-O"` | Extra [options](https://www.postgresql.org/docs/current/app-pgdump.html#PG-DUMP-OPTIONS) passed to pg\_dump |
|
|
| path | string | true | | Backup file output location |
|
|
|
|
<!-- AUTO-DOC-INPUT:END -->
|
|
|
|
* Free software: [MIT license](LICENSE)
|
|
|
|
## Credits
|
|
|
|
This package was created with [Cookiecutter](https://github.com/cookiecutter/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.
|