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/action.yml
2023-01-11 08:37:32 -07:00

25 lines
656 B
YAML

name: pg-dump
description: Run pg_dump to generate a backup
author: tj-actions
inputs:
database_url:
description: 'Database URL'
required: true
path:
description: 'Backup file output location'
required: true
options:
description: 'Extra [options](https://www.postgresql.org/docs/current/app-pgdump.html#PG-DUMP-OPTIONS) passed to pg_dump'
required: true
default: '-O'
runs:
using: 'composite'
steps:
- run: |
mkdir -p $(dirname "${{ inputs.path }}")
pg_dump ${{ inputs.options }} -d "${{ inputs.database_url }}" > "${{ inputs.path }}"
shell: bash
branding:
icon: hard-drive
color: white