mirror of
https://github.com/actions/runner-images.git
synced 2025-12-10 02:46:51 +00:00
* fix:URL for packages * chore Add co-author > > Co-authored-by: greg dryke <no-reply@github.com> * chore: Incorporate Review comments * fix: remove redundant initialization
30 lines
1.1 KiB
Bash
30 lines
1.1 KiB
Bash
#!/bin/bash -e
|
|
################################################################################
|
|
## File: install-sqlpackage.sh
|
|
## Desc: Install SqlPackage CLI to DacFx (https://docs.microsoft.com/sql/tools/sqlpackage/sqlpackage-download#get-sqlpackage-net-core-for-linux)
|
|
################################################################################
|
|
|
|
# Source the helpers for use with the script
|
|
source $HELPER_SCRIPTS/install.sh
|
|
source $HELPER_SCRIPTS/os.sh
|
|
|
|
# Install libssl1.1 dependency
|
|
if is_ubuntu22; then
|
|
focal_list=/etc/apt/sources.list.d/focal-security.list
|
|
echo "deb https://archive.ubuntu.com/ubuntu/ focal-security main" | tee "${focal_list}"
|
|
apt-get update --quiet
|
|
|
|
apt-get install --no-install-recommends libssl1.1
|
|
|
|
rm "${focal_list}"
|
|
apt-get update --quiet
|
|
fi
|
|
|
|
# Install SqlPackage
|
|
archive_path=$(download_with_retry "https://aka.ms/sqlpackage-linux")
|
|
unzip -qq "$archive_path" -d /usr/local/sqlpackage
|
|
chmod +x /usr/local/sqlpackage/sqlpackage
|
|
ln -sf /usr/local/sqlpackage/sqlpackage /usr/local/bin
|
|
|
|
invoke_tests "Tools" "SqlPackage"
|