mirror of
https://github.com/tj-actions/pg-dump.git
synced 2024-12-20 01:18:49 +00:00
20 lines
No EOL
334 B
Bash
Executable file
20 lines
No EOL
334 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
echo "::group::pg-dump"
|
|
|
|
echo "Creating the output directory..."
|
|
|
|
mkdir -p $(dirname "$INPUT_PATH")
|
|
|
|
echo "Created the output directory"
|
|
|
|
echo "Running pg_dump..."
|
|
|
|
# shellcheck disable=SC2086
|
|
pg_dump $INPUT_OPTIONS -d "$INPUT_DATABASE_URL" > "$INPUT_PATH"
|
|
|
|
echo "Complete"
|
|
|
|
echo "::endgroup::" |