Analyze .NET Core solution with SonarCloud and Github Actions

Hi,

I’d like to analyze my .NET Core solution with SonarCloud in Github Actions.
Is this a supported scenario?
I followed the instructions at https://github.com/marketplace/actions/sonarcloud-scan and added the SonarCloud step to my workflow:

  • name: SonarCloud Scan
    uses: sonarsource/sonarcloud-github-action@master
    env:
    GITHUB_TOKEN: {{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: {{ secrets.SONAR_TOKEN }}

It fails with the following error:

Run sonarsource/sonarcloud-github-action@master
env:
DOTNET_ROOT: C:\hostedtoolcache\windows\dncs\2.2.108\x64
GITHUB_TOKEN: ***
SONAR_TOKEN:
##[error]Container action is only supported on Linux

I configured the SONAR_TOKEN in my GitHub settings as suggested, but I don’t see any GITHUB_TOKEN in my repo secrets. Is that a built-in token on Github?

Update: Resolved.
My GitHub Actions workflow was configured for Windows. This was no problem up until the SonarCloud task. I now configured it to run on Linux and now the workflow succeeds across the board.

name: .NET Core
on: [push]
jobs:
   build:
        runs-on: ubuntu-latest