mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-17 23:36:44 +00:00
[Ubuntu] put Microsoft repo higher for dotnet (#6084)
This commit is contained in:
@@ -16,6 +16,19 @@ DOTNET_TOOLS=$(get_toolset_value '.dotnet.tools[].name')
|
||||
# Disable telemetry
|
||||
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||
|
||||
# There is a versions conflict, that leads to
|
||||
# Microsoft <-> Canonical repos dependencies mix up.
|
||||
# Give Microsoft's repo higher priority to avoid collisions.
|
||||
# See: https://github.com/dotnet/core/issues/7699
|
||||
|
||||
cat << EOF > /etc/apt/preferences.d/dotnet
|
||||
Package: *net*
|
||||
Pin: origin packages.microsoft.com
|
||||
Pin-Priority: 1001
|
||||
EOF
|
||||
|
||||
apt-get update
|
||||
|
||||
for latest_package in ${LATEST_DOTNET_PACKAGES[@]}; do
|
||||
echo "Determing if .NET Core ($latest_package) is installed"
|
||||
if ! IsPackageInstalled $latest_package; then
|
||||
@@ -26,6 +39,10 @@ for latest_package in ${LATEST_DOTNET_PACKAGES[@]}; do
|
||||
fi
|
||||
done
|
||||
|
||||
rm /etc/apt/preferences.d/dotnet
|
||||
|
||||
apt-get update
|
||||
|
||||
# Get list of all released SDKs from channels which are not end-of-life or preview
|
||||
sdks=()
|
||||
for version in ${DOTNET_VERSIONS[@]}; do
|
||||
|
||||
Reference in New Issue
Block a user