0
0
Fork 0
mirror of https://github.com/tj-actions/pg-dump.git synced 2025-06-11 13:12:32 +00:00

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>
This commit is contained in:
Tonye Jack 2023-09-12 13:02:42 -06:00 committed by GitHub
parent d9e5a3fe4f
commit ecfbb9388d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 173 additions and 3 deletions

24
entrypoint.sh Executable file
View file

@ -0,0 +1,24 @@
#!/usr/bin/env bash
set -euo pipefail
echo "::group::pg-dump"
echo "Checking if the output directory exists..."
if [ ! -d "$(dirname "$INPUT_PATH")" ]; then
echo "The output directory does not exist. Creating it..."
mkdir -p "$(dirname "$INPUT_PATH")"
echo "Created the output directory"
else
echo "The output directory already exists"
fi
echo "Running pg_dump..."
# shellcheck disable=SC2086
pg_dump $INPUT_OPTIONS -d "$INPUT_DATABASE_URL" > "$INPUT_PATH"
echo "Complete"
echo "::endgroup::"