BililiveRecorder/.github/workflows/codeql.yml

49 lines
1.1 KiB
YAML
Raw Normal View History

2022-12-02 18:58:48 +08:00
name: "CodeQL"
on:
push:
2022-12-03 22:02:15 +08:00
branches: [ 'dev' ]
2022-12-02 18:58:48 +08:00
pull_request:
# The branches below must be a subset of the branches above
branches: [ 'dev' ]
schedule:
- cron: '58 7 * * 6'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'csharp', 'javascript' ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
2022-12-03 22:02:15 +08:00
submodules: false # skip fetching webui, they are analyzed separately
- uses: actions/setup-dotnet@v3
2022-12-02 18:58:48 +08:00
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
queries: +security-extended
2022-12-02 18:58:48 +08:00
- name: Build CLI
2022-12-03 22:02:15 +08:00
if: ${{ matrix.language == 'csharp' }}
2022-12-02 18:58:48 +08:00
run: dotnet build BililiveRecorder.Cli/BililiveRecorder.Cli.csproj
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"