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
Tonye Jack ecfbb9388d
feat: add support for installing postgresql (#135)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-12 13:02:42 -06:00

38 lines
1.1 KiB
YAML

name: pg-dump
description: Run pg_dump to generate a backup
author: tj-actions
inputs:
postgresql_version:
description: 'Version of PostgreSQL. e.g 15'
required: false
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:
- name: Setup PostgreSQL
uses: tj-actions/install-postgresql@v2
if: inputs.postgresql_version != ''
with:
postgresql-version: ${{ inputs.postgresql_version }}
- run: |
bash $GITHUB_ACTION_PATH/entrypoint.sh
shell: bash
env:
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
# https://github.community/t/input-variable-name-is-not-available-in-composite-run-steps/127611
INPUT_PATH: ${{ inputs.path }}
INPUT_DATABASE_URL: ${{ inputs.database_url }}
INPUT_OPTIONS: ${{ inputs.options }}
branding:
icon: hard-drive
color: white