Skip to content

Commit 1cd1077

Browse files
FIX (deployment): Download PostgreSQL client tools
1 parent d56518b commit 1cd1077

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

.github/workflows/ci-release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,12 @@ jobs:
157157
# Wait for MinIO
158158
timeout 60 bash -c 'until nc -z localhost 9000; do sleep 2; done'
159159
160+
- name: Install PostgreSQL client tools
161+
run: |
162+
chmod +x backend/tools/download_linux.sh
163+
cd backend/tools
164+
./download_linux.sh
165+
160166
- name: Run database migrations
161167
run: |
162168
cd backend

backend/tools/download_linux.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
set -e # Exit on any error
44

5+
# Ensure non-interactive mode for apt
6+
export DEBIAN_FRONTEND=noninteractive
7+
58
echo "Installing PostgreSQL client tools versions 13-17 for Linux (Debian/Ubuntu)..."
69
echo
710

@@ -30,18 +33,18 @@ echo
3033

3134
# Add PostgreSQL official APT repository
3235
echo "Adding PostgreSQL official APT repository..."
33-
$SUDO apt-get update -qq
34-
$SUDO apt-get install -y wget ca-certificates
36+
$SUDO apt-get update -qq -y
37+
$SUDO apt-get install -y -qq wget ca-certificates
3538

3639
# Add GPG key
37-
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | $SUDO apt-key add -
40+
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | $SUDO apt-key add - 2>/dev/null
3841

3942
# Add repository
40-
echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" | $SUDO tee /etc/apt/sources.list.d/pgdg.list
43+
echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" | $SUDO tee /etc/apt/sources.list.d/pgdg.list >/dev/null
4144

4245
# Update package list
4346
echo "Updating package list..."
44-
$SUDO apt-get update -qq
47+
$SUDO apt-get update -qq -y
4548

4649
# Install client tools for each version
4750
versions="13 14 15 16 17"
@@ -50,7 +53,7 @@ for version in $versions; do
5053
echo "Installing PostgreSQL $version client tools..."
5154

5255
# Install client tools only
53-
$SUDO apt-get install -y postgresql-client-$version
56+
$SUDO apt-get install -y -qq postgresql-client-$version
5457

5558
# Create version-specific directory and symlinks
5659
version_dir="$POSTGRES_DIR/postgresql-$version"

0 commit comments

Comments
 (0)