Skip to content

Commit dea84f2

Browse files
authored
Tests - Fix DotNet installing on Ubuntu (#2808)
1 parent ca7c705 commit dea84f2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/nugetTests.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,21 @@ jobs:
3030
with:
3131
ref: ${{ github.event.pull_request.head.sha }}
3232

33-
# Install Mono on Ubuntu to run nuget.exe
34-
- name: Install Mono on Ubuntu
33+
# Prepare ubuntu by installing Mono and handle dotnet installation issues.
34+
- name: Prepare ubuntu
3535
if: matrix.os == 'ubuntu'
3636
run: |
37+
# Install Mono
3738
sudo apt-get update
3839
sudo apt-get install -y apt-transport-https dirmngr gnupg ca-certificates
3940
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
4041
echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
4142
sudo apt-get update
4243
sudo apt-get install -y mono-complete
44+
# Fixes dotnet installation issues, see https://github.com/jfrog/jfrog-cli/pull/2808 for more details.
45+
echo "DOTNET_INSTALL_DIR=/usr/share/dotnet" >> $GITHUB_ENV
46+
sudo mkdir -p /usr/share/dotnet
47+
sudo chmod 777 /usr/share/dotnet
4348
4449
- name: Install .NET
4550
uses: actions/setup-dotnet@v4

0 commit comments

Comments
 (0)