mirror of
https://github.com/tj-actions/pg-dump.git
synced 2024-12-20 01:18:49 +00:00
Updated README.md.
This commit is contained in:
parent
4ed55614ba
commit
41b19de949
2 changed files with 9 additions and 8 deletions
13
README.md
13
README.md
|
@ -9,6 +9,10 @@ Run pg_dump to generate a backup
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Postgres Dump Backup
|
- name: Postgres Dump Backup
|
||||||
uses: tj-actions/pg-dump@v1
|
uses: tj-actions/pg-dump@v1
|
||||||
|
with:
|
||||||
|
database_url: "postgres://test_user:test_user_password@localhost:5432/testdb"
|
||||||
|
path: "backups/backup.sql"
|
||||||
|
options: "-O"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,17 +20,14 @@ Run pg_dump to generate a backup
|
||||||
|
|
||||||
| Input | type | required | default | description |
|
| Input | type | required | default | description |
|
||||||
|:-------------:|:-----------:|:-------------:|:----------------------------:|:-------------:|
|
|:-------------:|:-----------:|:-------------:|:----------------------------:|:-------------:|
|
||||||
| token | `string` | `true` | `${{ github.token }}` | [GITHUB_TOKEN](https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow#using-the-github_token-in-a-workflow) <br /> or a repo scoped <br /> [Personal Access Token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token) |
|
| database_url | `string` | `true` | | Database URL |
|
||||||
|
| path | `string` | `true` | | Backup file output location |
|
||||||
|
| options | `string` | `true` | `-O` | Extra [options](https://www.postgresql.org/docs/9.6/app-pgdump.html#PG-DUMP-OPTIONS) passed to pg_dump |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
* Free software: [MIT license](LICENSE)
|
* Free software: [MIT license](LICENSE)
|
||||||
|
|
||||||
Features
|
|
||||||
--------
|
|
||||||
|
|
||||||
* TODO
|
|
||||||
|
|
||||||
|
|
||||||
Credits
|
Credits
|
||||||
-------
|
-------
|
||||||
|
|
|
@ -8,7 +8,7 @@ inputs:
|
||||||
path:
|
path:
|
||||||
description: 'Backup file output location'
|
description: 'Backup file output location'
|
||||||
required: true
|
required: true
|
||||||
args:
|
options:
|
||||||
description: 'Extra arguments passed to pg_dump'
|
description: 'Extra arguments passed to pg_dump'
|
||||||
required: true
|
required: true
|
||||||
default: '-O'
|
default: '-O'
|
||||||
|
@ -17,7 +17,7 @@ runs:
|
||||||
using: 'composite'
|
using: 'composite'
|
||||||
steps:
|
steps:
|
||||||
- run: |
|
- run: |
|
||||||
pg_dump "${{ inputs.args }}" -d "${{ inputs.database_url }}" > "${{ inputs.path }}"
|
pg_dump "${{ inputs.options }}" -d "${{ inputs.database_url }}" > "${{ inputs.path }}"
|
||||||
shell: bash
|
shell: bash
|
||||||
branding:
|
branding:
|
||||||
icon: hard-drive
|
icon: hard-drive
|
||||||
|
|
Loading…
Add table
Reference in a new issue