Skip to content

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: Build and Analyze with SonarCloud
on:
push:
branches: [ "develop", "devon4net_github_actions" ]
pull_request:
branches: [ "develop", "devon4net_github_actions" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
# - name: build
# run: |
# cd source
# dotnet restore
# dotnet build

Check failure on line 28 in .github/workflows/build-project.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build-project.yml

Invalid workflow file

You have an error in your yaml syntax on line 28
- name: Build and analyze
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# shell: powershell
run: |
cd source
.\.sonar\scanner\dotnet-sonarscanner begin /k:"JosepFe_devon4net" /o:"josepfe" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
dotnet restore
dotnet build
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
# - name: Analyze with SonarCloud
# uses: sonarsource/sonarcloud-github-action@v1
# with:
# project-key: ${{ secrets.SONAR_PROJECT_KEY }}
# project-name: "devon4net"
# token: ${{ secrets.SONAR_TOKEN }}
# github-token: ${{ secrets.GITHUB_TOKEN }}