-
Notifications
You must be signed in to change notification settings - Fork 474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to select to install matching version already available on the current image #356
Comments
Hi, @Piedone 👋 Thanks for the feature request! The I'm not sure that I fully answered your question, so if you have any additional questions feel free to ask me. |
Thank you, I'm aware of that and this is what I intended to explain at the start of the issue description too. I clarified the issue, but the point here is to add an option to always install the locally available version matching |
Thank you for the clarification ❤️, We will investigate the ability to add this feature and get back to you with updates! |
Thank you for your quick reply! |
I'd like this feature too!! In 97% of my cases, the ability to tell the action to "use the latest preinstalled version that matches my version string, and if none then fall back to downloading the latest matching as per normal" is what I want to do. Cheers |
@IvanZosimov this may be a dumb question, but what is the purpose of the version argument? As the documentation mentions, the latest preinstalled version will be used, unless the user creates a global.json file. It just seems to me like the version argument is largely useless, and causes people confusion because it's not how users would rightfully expect things to work based on any of the other setup-XXX GitHub actions. Cheers |
Hi, @ericsampson 👋 Sorry for the late response, I agree with you. We are working on eliminating these confusions. |
thank you @IvanZosimov , sorry for my late response! ;) |
However, even after I create the global.json file specifying that I want to use version 7.0, it still always installs the latest version(8.0), for me, before finally installing the version specified by the dotnet-version parameter(7.0) for me. |
Description:
Currently, when you set e.g.
dotnet-version: '6.0.x'
then the action will install the latest 6.0.x version available online. If this is preinstalled on the current runner image, then no actual installation will happen, only a check; if there is a more recent version available for download from Microsoft (like 6.0.1 is preinstalled but 6.0.2 is released) then it'll download and install that version.This is all good, but my request would be to add an option to always install the locally available version matching
dotnet-version
, and only fall back to a download if a local version can't be matched. E.g., if 6.0.1 is preinstalled on the runner image, then just use that fordotnet-version: '6.0.x'
, even if online a 6.0.2 version is also available.Related: #284
Justification:
For our builds, we want to keep up to date with the patch versions of .NET, the assumption being that those are safe to auto-update to and also useful because they continuously bring bug fixes. So, we want to tell the action "just install whatever's latest for 6.0.x". However, it's not critical that we're always using the latest version right at the moment it's released, we can wait until GHA images are updated in exchange for not paying the penalty of installation (30-120 seconds) in case the preinstalled version is not the most recent one.
Are you willing to submit a PR?
I wouldn't venture into that for now.
The text was updated successfully, but these errors were encountered: