Comments (4)
resolved in #80
from setup-dotnet.
@litetex I did try using the latest sdk version (as per https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/5.0/releases.json) in yml
but this fails e.g.:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
dotnet: [ '5.0.100-preview.3.20216.6' ]
# ...
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ runner.dotnet }}
Am I specifying it wrong? :) Seems like the ${{ runner.dotnet }}
is not unfolded correctly...
from setup-dotnet.
Okay I see the problem now.
@nietras
At first:
You should use ${{ matrix.dotnet }}
instead of ${{ runner.dotnet }}
.
For more info checkout the docs
Second: it seems like the input is not validated correctly
→ https://github.com/litetex/ConsoleApp1/runs/618343455
Run actions/setup-dotnet@v1
with:
So dotnet is installed without any version information - clearly the workflow should fail now but it doesn't.
The following dotnet restore
reads:
Run dotnet restore
Welcome to .NET Core 3.1!
Because the github vm's are set up with dotnet:
https://help.github.com/en/actions/reference/software-installed-on-github-hosted-runners
e.g.:
https://github.com/actions/virtual-environments/blob/master/images/linux/Ubuntu1804-README.md
The main error reason seems to be that https://github.com/actions/setup-dotnet/blob/master/action.yml
dotnet-version:
description: 'SDK version to use. Example: 2.2.104'
does not match what's written in the source code
//
// Version is optional. If supplied, install / use from the tool cache
// If not supplied then task is still used to setup proxy, auth, etc...
//
let version = core.getInput('version');
if (!version) {
version = core.getInput('dotnet-version');
}
if (version) {
const dotnetInstaller = new installer.DotnetCoreInstaller(version);
await dotnetInstaller.installDotnet();
}
const sourceUrl: string = core.getInput('source-url');
const configFile: string = core.getInput('config-file');
if (sourceUrl) {
auth.configAuthentication(sourceUrl, configFile);
}
// TODO: setup proxy from runner proxy config
const matchersPath = path.join(__dirname, '..', '.github');
console.log(`##[add-matcher]${path.join(matchersPath, 'csc.json')}`);
} catch (error) {
core.setFailed(error.message);
}
from setup-dotnet.
You should use ${{ matrix.dotnet }} instead of ${{ runner.dotnet }}.
@litetex thanks, yes it seems the source I copied this from got it wrong. I got the preview working but now my issue is you cannot install multiple sdks it seems, closing this though since setting up a preview version is not a problem :)
from setup-dotnet.
Related Issues (20)
- Incorrect Dotnet Version Displayed in GitHub Actions Workflow HOT 15
- Wrong Download URLs for 7.0 HOT 1
- Cache fails to be recreated after NuGet package update HOT 6
- Problem matcher does not work with normal verbosity HOT 5
- Dotnet version looking for a version that is not available HOT 1
- All dotnet commands fail due to environment variables HOT 6
- .NET Test invoking an Azure Function: An error occurred trying to start process 'func' with working directory. The system cannot find the file specified. HOT 6
- .NET MAUI IOS HOT 4
- Share this site HOT 1
- Fallback to different installation directory if `/usr/share/dotnet` doesn't available due to permissions HOT 4
- Allow control of the noCdn / no_cdn script parameters HOT 1
- Unauthorised when using `secrets.GITHUB_TOKEN`. Packages not pushed to Github Repository Packages when using PAT. HOT 9
- Add a possibility to specify the verbosity flag for the install-scripts execution HOT 1
- Support SDK workloads HOT 2
- Support explicit architecture for dotnet HOT 1
- Allow tools to cache
- NUGET_AUTH_TOKEN does not work for official NuGet repository HOT 3
- Docs Bug: v4 README points to v3 HOT 2
- Bitcoin HOT 1
- Infrequent "MSB4236: The SDK 'Microsoft.NET.Sdk.Web' specified could not be found" errors with ubuntu 24.04 hosted runner. HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from setup-dotnet.