mirror of
https://github.com/actions/runner-images.git
synced 2025-12-16 06:40:32 +00:00
[Ubuntu] Remove apt-key from postgresql installer (#5686)
This commit is contained in:
@@ -11,8 +11,8 @@ source $HELPER_SCRIPTS/install.sh
|
|||||||
REPO_URL="https://apt.postgresql.org/pub/repos/apt/"
|
REPO_URL="https://apt.postgresql.org/pub/repos/apt/"
|
||||||
|
|
||||||
# Preparing repo for PostgreSQL
|
# Preparing repo for PostgreSQL
|
||||||
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
|
wget -qO - https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor > /usr/share/keyrings/postgresql.gpg
|
||||||
echo "deb $REPO_URL $(getOSVersionLabel)-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list
|
echo "deb [signed-by=/usr/share/keyrings/postgresql.gpg] $REPO_URL $(getOSVersionLabel)-pgdg main" > /etc/apt/sources.list.d/pgdg.list
|
||||||
|
|
||||||
# Fetch PostgreSQL version to install from the toolset
|
# Fetch PostgreSQL version to install from the toolset
|
||||||
toolsetVersion=$(get_toolset_value '.postgresql.version')
|
toolsetVersion=$(get_toolset_value '.postgresql.version')
|
||||||
@@ -30,6 +30,7 @@ systemctl is-active --quiet postgresql.service && systemctl stop postgresql.serv
|
|||||||
systemctl disable postgresql.service
|
systemctl disable postgresql.service
|
||||||
|
|
||||||
rm /etc/apt/sources.list.d/pgdg.list
|
rm /etc/apt/sources.list.d/pgdg.list
|
||||||
|
rm /usr/share/keyrings/postgresql.gpg
|
||||||
|
|
||||||
echo "postgresql $REPO_URL" >> $HELPER_SCRIPTS/apt-sources.txt
|
echo "postgresql $REPO_URL" >> $HELPER_SCRIPTS/apt-sources.txt
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user