Merge pull request #8 from JsonViewer-Component/dependabot/nuget/Micr… #29
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 Security Analysis | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main ] | |
| schedule: | |
| - cron: '0 0 * * 1' # Every Monday at midnight | |
| workflow_dispatch: | |
| jobs: | |
| analyze: | |
| name: 🔍 Analyze C# | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: read | |
| contents: read | |
| security-events: write | |
| packages: read | |
| steps: | |
| - name: 📥 Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: 🔧 Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '7.0.x' | |
| - name: ⚙️ Initialize CodeQL | |
| uses: github/codeql-action/init@v3 | |
| with: | |
| languages: csharp | |
| config-file: ./.github/codeql/codeql-config.yml | |
| - name: 🏗️ Build Projects | |
| run: | | |
| echo "📦 Restoring dependencies..." | |
| dotnet restore JsonViewer.Blazor.sln | |
| echo "🏗️ Building Component..." | |
| dotnet build src/Component/Component.csproj -c Release --no-restore | |
| echo "🏗️ Building Demo..." | |
| dotnet build src/Blazor.Demo/Blazor.Demo.csproj -c Release --no-restore | |
| echo "✅ Build completed" | |
| - name: 🔍 Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@v3 | |
| with: | |
| category: "/language:csharp" |