Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add codeql scan #12

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: CI

on:
pull_request:
Expand All @@ -15,18 +15,41 @@ jobs:
#container: mcr.microsoft.com/dotnet/aspnet:7.0
#env:
# USERPROFILE: "./"
permissions:
security-events: write
actions: read
steps:
- uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java
- name: Setup .NET Core SDK 7
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7
- name: Install dependencies
run: dotnet restore
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# Command-line programs to run using the OS shell.
# https://git.io/JvXDl
# If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --verbosity normal

# dotnet 7 has builtin docker target support using Microsoft.NET.Build.Containers package
- name: Publish
run: dotnet publish ./WebApi/WebApi.csproj --no-restore -c Release -o ./dist
Expand Down