actions / setup-dotnet

Set up your GitHub Actions workflow with a specific version of the .NET core sdk
MIT License
922 stars 454 forks source link

dotnet-install "The requested URL returned error: 404" #361

Closed jacob-winkler closed 1 year ago

jacob-winkler commented 1 year ago

Description: dotnet-install is having trouble finding the .NET Core SDK at the primary link.

with:
    dotnet-version: 6.0.12
/home/runner/work/_actions/actions/setup-dotnet/v[3](https://github.com/jacob-winkler/starswarm/actions/runs/3760746065/jobs/6391795337#step:3:3)/externals/install-dotnet.sh --version 6.0.12
dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.

dotnet-install: Attempting to download using primary link https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.12/dotnet-sdk-6.0.12-linux-x6[4](https://github.com/jacob-winkler/starswarm/actions/runs/3760746065/jobs/6391795337#step:3:5).tar.gz
curl: (22) The requested URL returned error: 404
dotnet-install: The resource at primary link 'https://dotnetcli.azureedge.net/dotnet/Sdk/[6](https://github.com/jacob-winkler/starswarm/actions/runs/3760746065/jobs/6391795337#step:3:7).0.12/dotnet-sdk-6.0.12-linux-x64.tar.gz' is not available.
dotnet-install: Attempting to download using primary link https://dotnetbuilds.azureedge.net/public/Sdk/6.0.12/dotnet-sdk-6.0.12-linux-x64.tar.gz
curl: (22) The requested URL returned error: 404
dotnet-install: The resource at primary link 'https://dotnetbuilds.azureedge.net/public/Sdk/6.0.12/dotnet-sdk-6.0.12-linux-x64.tar.gz' is not available.
dotnet_install: Error: Could not find `.NET Core SDK` with version = 6.0.12
dotnet_install: Error: Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support
Error: Failed to install dotnet 1. dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.

dotnet-install: Attempting to download using primary link https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.12/dotnet-sdk-6.0.12-linux-x64.tar.gz
curl: (22) The requested URL returned error: 404
dotnet-install: The resource at primary link 'https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.[12](https://github.com/jacob-winkler/starswarm/actions/runs/3760746065/jobs/6391795337#step:3:13)/dotnet-sdk-6.0.12-linux-x64.tar.gz' is not available.
dotnet-install: Attempting to download using primary link https://dotnetbuilds.azureedge.net/public/Sdk/6.0.12/dotnet-sdk-6.0.12-linux-x64.tar.gz
curl: (22) The requested URL returned error: 404
dotnet-install: The resource at primary link 'https://dotnetbuilds.azureedge.net/public/Sdk/6.0.12/dotnet-sdk-6.0.12-linux-x64.tar.gz' is not available.

I'm running the starter workflow as an action in my github repository. Thinking I must be doing something wrong, but the error seems to indicate the target file is just missing.

Task version: Not sure about this. Is actions/setup-dotnet@v3 what you're looking for?

Platform:

Runner type:

Repro steps:
Create a new repository for a C# project Add an action using the starter workflow here https://github.com/actions/starter-workflows/blob/main/ci/dotnet.yml Add the workflow as a required status Create a new PR

Expected behavior: I was expecting the workflow to try and build my project.

Actual behavior: The dotnet SDK is not installing and the task errors out before building my project.

IvanZosimov commented 1 year ago

Hi, @jacob-winkler 👋 Thanks for the issue! The thing is that in the dotnet-version input you specified runtime but not sdk version. Our action installs .NET SDK + runtime based on the specified .NET SDK version. The latest version of 6.0 .NET SDK currently is 6.0.404 - try to use it instead of 6.0.12 😉

I'm going to close this issue now, if you have any additional questions feel free to ping us.

jacob-winkler commented 1 year ago

Knew it was me 😅 I appreciate the help!