mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-27 23:17:20 +01:00
Fold Code Scanning into CI Pipeline
This commit is contained in:
@@ -82,6 +82,38 @@ jobs:
|
||||
- name: GitHub Requires at Least One Step for a Job
|
||||
run: exit 0
|
||||
|
||||
analyze:
|
||||
name: Code Scanning
|
||||
needs: start-ci-run-gate
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
if: (!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success' && ${{ vars.TGS_ENABLE_CODE_QL }} == 'true')
|
||||
steps:
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x'
|
||||
dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }}
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: csharp
|
||||
|
||||
- name: Build
|
||||
run: dotnet build -c ReleaseNoWindows -p:TGS_HOST_NO_WEBPANEL=true
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
with:
|
||||
category: "/language:csharp"
|
||||
|
||||
dmapi-build:
|
||||
name: Build DMAPI
|
||||
needs: start-ci-run-gate
|
||||
@@ -1314,7 +1346,7 @@ jobs:
|
||||
|
||||
ci-completion-gate: # This job exists so there isn't a moving target for branch protections
|
||||
name: CI Completion Gate
|
||||
needs: [ pages-build, docker-build, build-deb, build-msi, validate-openapi-spec, upload-code-coverage, check-winget-pr-template ]
|
||||
needs: [ pages-build, docker-build, build-deb, build-msi, validate-openapi-spec, upload-code-coverage, check-winget-pr-template, analyze ]
|
||||
runs-on: ubuntu-latest
|
||||
if: (!(cancelled() || failure()) && needs.pages-build.result == 'success' && needs.docker-build.result == 'success' && needs.build-deb.result == 'success' && needs.build-msi.result == 'success' && needs.validate-openapi-spec.result == 'success' && needs.upload-code-coverage.result == 'success' && needs.check-winget-pr-template.result == 'success')
|
||||
steps:
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
name: 'Code Scanning'
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: 0 23 * * 1
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
- master
|
||||
- V6
|
||||
pull_request:
|
||||
branches:
|
||||
- dev
|
||||
- master
|
||||
- V6
|
||||
|
||||
env:
|
||||
TGS_DOTNET_VERSION: 8
|
||||
TGS_DOTNET_QUALITY: ga
|
||||
|
||||
concurrency:
|
||||
group: "code-scanning-${{ github.head_ref || github.run_id }}-${{ github.event_name }}"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Code Scanning
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
if: ${{ vars.TGS_ENABLE_CODE_QL }} == 'true'
|
||||
steps:
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x'
|
||||
dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }}
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: csharp
|
||||
|
||||
- name: Build
|
||||
run: dotnet build -c ReleaseNoWindows -p:TGS_HOST_NO_WEBPANEL=true
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
with:
|
||||
category: "/language:csharp"
|
||||
Reference in New Issue
Block a user