mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-18 15:56:47 +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
|
# Disable telemetry
|
||||||
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
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
|
for latest_package in ${LATEST_DOTNET_PACKAGES[@]}; do
|
||||||
echo "Determing if .NET Core ($latest_package) is installed"
|
echo "Determing if .NET Core ($latest_package) is installed"
|
||||||
if ! IsPackageInstalled $latest_package; then
|
if ! IsPackageInstalled $latest_package; then
|
||||||
@@ -26,6 +39,10 @@ for latest_package in ${LATEST_DOTNET_PACKAGES[@]}; do
|
|||||||
fi
|
fi
|
||||||
done
|
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
|
# Get list of all released SDKs from channels which are not end-of-life or preview
|
||||||
sdks=()
|
sdks=()
|
||||||
for version in ${DOTNET_VERSIONS[@]}; do
|
for version in ${DOTNET_VERSIONS[@]}; do
|
||||||
|
|||||||
Reference in New Issue
Block a user