-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
action.yml
38 lines (37 loc) · 1.14 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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@v3
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