actions / actions/setup-dotnet
Ability to select to install matching version already available on the current image
@nikolai-laevskii is already working on this.
Since Aug 15, 2023.
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 572
- Avg merge
- 12d 20h
- Merged PRs (30d)
- 1
Description
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 for dotnet-version: '6.0.x', even if online a 6.0.2 version is also available.
Related: https://github.com/actions/setup-dotnet/issues/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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.