Skip to content

Commit 9622491

Browse files
authored
Add CodeQL analysis workflow configuration
Signed-off-by: Christopher Jr Riley <chrisjr@cjrriley.com>
1 parent 7da9306 commit 9622491

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
schedule:
9+
- cron: "21 14 * * 5"
10+
11+
jobs:
12+
analyze:
13+
name: Analyze (${{ matrix.language }})
14+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
15+
16+
permissions:
17+
security-events: write
18+
packages: read
19+
actions: read
20+
contents: read
21+
22+
strategy:
23+
fail-fast: false
24+
25+
matrix:
26+
include:
27+
- language: actions
28+
build-mode: none
29+
- language: swift
30+
build-mode: manual
31+
32+
steps:
33+
- name: Checkout repository
34+
uses: actions/checkout@v4
35+
- name: Initialize CodeQL
36+
uses: github/codeql-action/init@v4
37+
with:
38+
languages: ${{ matrix.language }}
39+
build-mode: ${{ matrix.build-mode }}
40+
- name: Build Swift package
41+
if: matrix.language == 'swift'
42+
shell: bash
43+
run: |
44+
swift --version
45+
swift build --arch arm64
46+
- name: Perform CodeQL Analysis
47+
uses: github/codeql-action/analyze@v4
48+
with:
49+
category: "/language:${{ matrix.language }}"

0 commit comments

Comments
 (0)