From dea84f26ef676d147179a83494015183cf0e66f3 Mon Sep 17 00:00:00 2001 From: Eyal Delarea Date: Mon, 30 Dec 2024 16:00:49 +0200 Subject: [PATCH] Tests - Fix DotNet installing on Ubuntu (#2808) --- .github/workflows/nugetTests.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nugetTests.yml b/.github/workflows/nugetTests.yml index d71fdf0ab..688465904 100644 --- a/.github/workflows/nugetTests.yml +++ b/.github/workflows/nugetTests.yml @@ -30,16 +30,21 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} - # Install Mono on Ubuntu to run nuget.exe - - name: Install Mono on Ubuntu + # Prepare ubuntu by installing Mono and handle dotnet installation issues. + - name: Prepare ubuntu if: matrix.os == 'ubuntu' run: | + # Install Mono sudo apt-get update sudo apt-get install -y apt-transport-https dirmngr gnupg ca-certificates sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list sudo apt-get update sudo apt-get install -y mono-complete + # Fixes dotnet installation issues, see https://github.com/jfrog/jfrog-cli/pull/2808 for more details. + echo "DOTNET_INSTALL_DIR=/usr/share/dotnet" >> $GITHUB_ENV + sudo mkdir -p /usr/share/dotnet + sudo chmod 777 /usr/share/dotnet - name: Install .NET uses: actions/setup-dotnet@v4