mirror of
https://github.com/tj-actions/pg-dump.git
synced 2025-06-11 13:12:32 +00:00
Updated the script
This commit is contained in:
parent
ccd8792e24
commit
68260fe408
3 changed files with 34 additions and 2 deletions
17
entrypoint.sh
Normal file → Executable file
17
entrypoint.sh
Normal file → Executable file
|
@ -1,3 +1,20 @@
|
|||
#!/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::"
|
Loading…
Add table
Add a link
Reference in a new issue