Skip to content

Add permission block to workflow and fix code scanning alert #8

Add permission block to workflow and fix code scanning alert

Add permission block to workflow and fix code scanning alert #8

Workflow file for this run

name: Build Backend and Frontend
on:
pull_request:
branches:
- main
jobs:
build:
permissions:
contents: read
permissions:
contents: read
name: Build All Projects
runs-on: ubuntu-latest

Check failure on line 18 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yml

Invalid workflow file

You have an error in your yaml syntax on line 18
strategy:
fail-fast: false
matrix:
project:
- SampleApp/BackEnd/BackEnd.csproj
- SampleApp/FrontEnd/FrontEnd.csproj
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Restore dependencies
run: dotnet restore ${{ matrix.project }}
- name: Build project
run: dotnet build ${{ matrix.project }} --no-restore --configuration Release