Sync
All checks were successful
Deployment Verification Ubuntu / deploy-and-test (push) Successful in 2m16s

This commit is contained in:
Hubert Cornet 2025-04-27 11:23:26 +02:00
parent b39e4b49c1
commit 60b2e9877f
2 changed files with 27 additions and 6 deletions

View File

@ -1,5 +1,5 @@
# #
name: Deployment Verification name: Deployment Verification Ubuntu
on: on:
push: push:

View File

@ -29,14 +29,35 @@ Acquire::http::Proxy "http://username:password@proxy.example.com:8080/";
Acquire::https::Proxy "http://username:password@proxy.example.com:8080/"; Acquire::https::Proxy "http://username:password@proxy.example.com:8080/";
# For APT to use the system's proxy settings # For APT to use the system's proxy settings
Acquire::http::Proxy "http://$HTTP_PROXY"; Acquire::http::Proxy "http://${HTTP_PROXY}";
Acquire::https::Proxy "http://$HTTPS_PROXY"; Acquire::https::Proxy "http://${HTTPS_PROXY}";
Acquire::ftp::proxy "http://$FTP_PROXY"; Acquire::ftp::proxy "ftp://${FTP_PROXY}";
# To disable proxy for specific hosts # To disable proxy for specific hosts
Acquire::http::Proxy::hostname.example.com "DIRECT"; Acquire::http::Proxy::hostname.example.com "DIRECT";
EOF EOF
apt-get update
if [ $? -eq 0 ]; then
log_message "SUCCESS" "Package lists updated successfully"
else
cat > "$PROXY_FILE" << EOF
Acquire::http::Proxy "http://$HTTP_PROXY";
Acquire::https::Proxy "http://$HTTPS_PROXY";
Acquire::ftp::proxy "ftp://$FTP_PROXY";
EOF
apt-get update
if [ $? -eq 0 ]; then
log_message "SUCCESS" "Package lists updated successfully with proxy"
else
log_message "ERROR" "Failed to update package lists with proxy"
fi
return 1
fi
log_message "SUCCESS" "APT proxy documentation created. Edit $PROXY_FILE to configure proxies if needed" log_message "SUCCESS" "APT proxy documentation created. Edit $PROXY_FILE to configure proxies if needed"
} }
@ -49,6 +70,7 @@ update_upgrade_packages() {
log_message "SUCCESS" "Package lists updated successfully" log_message "SUCCESS" "Package lists updated successfully"
else else
log_message "ERROR" "Failed to update package lists" log_message "ERROR" "Failed to update package lists"
return 1 return 1
fi fi
@ -59,6 +81,7 @@ update_upgrade_packages() {
log_message "SUCCESS" "Packages upgraded successfully" log_message "SUCCESS" "Packages upgraded successfully"
else else
log_message "ERROR" "Failed to upgrade packages" log_message "ERROR" "Failed to upgrade packages"
return 1 return 1
fi fi
} }
@ -72,8 +95,6 @@ install_essential_packages() {
"software-properties-common" "software-properties-common"
"curl" "curl"
"wget" "wget"
# "ufw"
# "unattended-upgrades"
"apt-listchanges" "apt-listchanges"
) )