Skip to content

Commit a367e84

Browse files
committed
+.github/workflows/codeql-analysis.yml
Fixes "Exit code was 32 and last log line was: CodeQL detected code written in C/C++, but not any written in GitHub Actions.". Is followup to: commit HEAD~1 (-`.github/workflows/codacy.yml`), which introduced this (through removal of `.github/workflows/`).
1 parent 5725afb commit a367e84

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed

.github/codeql/codeql-config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
name: "CodeQL config"
2+
3+
paths-ignore:
4+
- '/c/rfc6234'

.github/workflows/codeql-analysis.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: "Code scanning - action"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- preview
8+
pull_request:
9+
branches:
10+
- main
11+
- preview
12+
paths:
13+
- 'cxx/**'
14+
- '.github/codeql/**'
15+
- '.github/workflows/codeql-analysis.yml'
16+
schedule:
17+
- cron: '0 9 * * 1'
18+
19+
jobs:
20+
CodeQL-Build:
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
language: ['actions', 'c++']
25+
26+
runs-on: ubuntu-latest
27+
28+
permissions:
29+
contents: read
30+
security-events: write
31+
pull-requests: read
32+
33+
steps:
34+
# - name: Setup dotnet
35+
# uses: actions/setup-dotnet@v4
36+
# with:
37+
# dotnet-version: 9.0.100
38+
39+
- name: Checkout repository
40+
uses: actions/checkout@v4
41+
42+
# Initializes the CodeQL tools for scanning.
43+
- name: Initialize CodeQL
44+
uses: github/codeql-action/init@main
45+
with:
46+
languages: ${{ matrix.language }}
47+
config-file: ./.github/codeql/codeql-config.yml
48+
49+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
50+
# If this step fails, then you should remove it and run the build manually (see below)
51+
- name: Autobuild
52+
uses: github/codeql-action/autobuild@main
53+
54+
# ℹ️ Command-line programs to run using the OS shell.
55+
# 📚 https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
56+
57+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
58+
# and modify them (or add more) to build your code if your project
59+
# uses a compiled language
60+
61+
# - run: |
62+
# cd csharp
63+
# dotnet tool restore
64+
# dotnet build .
65+
66+
- name: Perform CodeQL Analysis
67+
uses: github/codeql-action/analyze@main

0 commit comments

Comments
 (0)