mirror of
https://github.com/actions/runner-images.git
synced 2025-12-13 12:48:18 +00:00
Another mop up commit to add missing changes from the last mop-up.
This commit is contained in:
29
images/linux/scripts/installers/dotnetcore.sh
Normal file
29
images/linux/scripts/installers/dotnetcore.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
################################################################################
|
||||
## File: dotnetcore.sh
|
||||
## Desc: Installs .NET Core onto the image for running the provisioner
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/apt.sh
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
|
||||
DOTNET_PACKAGE=dotnet-dev-1.0.4
|
||||
|
||||
echo "Determing if .NET Core ($DOTNET_PACKAGE) is installed"
|
||||
if ! IsInstalled $DOTNET_PACKAGE; then
|
||||
echo "Could not find .NET Core ($DOTNET_PACKAGE), installing..."
|
||||
echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list
|
||||
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893
|
||||
apt-get update
|
||||
apt-get install $DOTNET_PACKAGE -y
|
||||
else
|
||||
echo ".NET Core ($DOTNET_PACKAGE) is already installed"
|
||||
fi
|
||||
|
||||
echo "Testing .NET Core ($DOTNET_PACKAGE)"
|
||||
echo "Pulling down initial dependencies"
|
||||
dotnet help
|
||||
|
||||
echo "Documenting .NET Core ($DOTNET_PACKAGE)"
|
||||
DOTNET_VERSION=`dotnet --version`
|
||||
DocumentInstalledItem ".NET Core $DOTNET_VERSION"
|
||||
Reference in New Issue
Block a user