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

Verify if requested version exists before attempting to install #343

Closed timheuer closed 1 year ago

timheuer commented 1 year ago

Description: When using the setup action, you specify a dotnet-version. If the runner being used already has the requested version (or pattern-matched version) then there really is no need to continue trying to install again and it should succeed, printing out the version found.

Justification: Saves time in CI runs for users (and thus saves them money :-))

IvanZosimov commented 1 year ago

Hi, @timheuer 👋 Thank you for that feature request! In the recent major release v3 this feature was added to the action.

By now I'm going to close this issue, if you have any additions feel free to ping me.

timheuer commented 1 year ago

Oh nice! The logs seem to indicate that it is still executing the download script.

-th


From: Ivan @.> Sent: Thursday, November 10, 2022 12:17:02 AM To: actions/setup-dotnet @.> Cc: Tim Heuer @.>; Mention @.> Subject: Re: [actions/setup-dotnet] Verify if requested version exists before attempting to install (Issue #343)

Closed #343https://github.com/actions/setup-dotnet/issues/343 as completed.

— Reply to this email directly, view it on GitHubhttps://github.com/actions/setup-dotnet/issues/343#event-7780282751, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAABFVLPVKI3VKGZO5VD3Y3WHSOO5ANCNFSM6AAAAAAR3UF77E. You are receiving this because you were mentioned.Message ID: @.***>

IvanZosimov commented 1 year ago

@timheuer, the action under the hood uses the official .NET installer scripts. These scripts check whether the required .NET version is installed on the machine and exit installation in case the required version is found. Probably in the logs you see that action executes this official script.