Fix CodeQL workflow: override TargetFrameworks to prevent iOS workload errors on Ubuntu #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "CodeQL" | |
| on: | |
| push: | |
| branches: [ "develop", "main" ] | |
| pull_request: | |
| branches: [ "develop", "main" ] | |
| schedule: | |
| - cron: "0 0 1 * *" | |
| workflow_dispatch: | |
| permissions: | |
| actions: read | |
| contents: read | |
| security-events: write | |
| env: | |
| DOTNET_NOLOGO: true | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| jobs: | |
| analyze: | |
| name: Analyze | |
| runs-on: ubuntu-latest | |
| if: ${{ github.actor != 'dependabot[bot]' }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| language: [ "csharp" ] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| - name: Setup .NET 9 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Install MAUI workloads | |
| run: | | |
| dotnet workload install android --ignore-failed-sources | |
| dotnet workload install maui-android --ignore-failed-sources | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@v4 | |
| with: | |
| languages: ${{ matrix.language }} | |
| queries: +security-and-quality | |
| - name: Restore dependencies | |
| run: dotnet restore Trimble.Modus.Components.sln | |
| - name: Build | |
| run: dotnet build Trimble.Modus.Components.sln -f net9.0-android -c Release --no-restore | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@v4 | |
| with: | |
| category: "/language:${{matrix.language}}" |