diff --git a/README.md b/README.md
index f10e2e6..0f66b7b 100644
--- a/README.md
+++ b/README.md
@@ -9,6 +9,10 @@ Run pg_dump to generate a backup
- uses: actions/checkout@v2
- name: Postgres Dump Backup
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 |
|:-------------:|:-----------:|:-------------:|:----------------------------:|:-------------:|
-| 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)
or a repo scoped
[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)
-Features
---------
-
-* TODO
-
Credits
-------
diff --git a/action.yml b/action.yml
index 3c2affd..a52acb8 100644
--- a/action.yml
+++ b/action.yml
@@ -8,7 +8,7 @@ inputs:
path:
description: 'Backup file output location'
required: true
- args:
+ options:
description: 'Extra arguments passed to pg_dump'
required: true
default: '-O'
@@ -17,7 +17,7 @@ runs:
using: 'composite'
steps:
- run: |
- pg_dump "${{ inputs.args }}" -d "${{ inputs.database_url }}" > "${{ inputs.path }}"
+ pg_dump "${{ inputs.options }}" -d "${{ inputs.database_url }}" > "${{ inputs.path }}"
shell: bash
branding:
icon: hard-drive