Skip to content

Commit 38176b4

Browse files
matthewdaleblink1073
authored andcommitted
GODRIVER-3245 Use a custom CodeQL workflow. (mongodb#1674)
(cherry picked from commit 6e75330)
1 parent 269ba66 commit 38176b4

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

.github/workflows/codeql.yml

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ "v1", "cloud-*", "master", "release/*" ]
6+
pull_request:
7+
branches: [ "v1", "cloud-*", "master", "release/*" ]
8+
schedule:
9+
- cron: '36 17 * * 0'
10+
workflow_call:
11+
inputs:
12+
ref:
13+
required: true
14+
type: string
15+
16+
jobs:
17+
analyze:
18+
name: Analyze (${{ matrix.language }})
19+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
20+
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
21+
permissions:
22+
# required for all workflows
23+
security-events: write
24+
25+
# required to fetch internal or private CodeQL packs
26+
packages: read
27+
28+
# only required for workflows in private repositories
29+
actions: read
30+
contents: read
31+
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
include:
36+
- language: go
37+
build-mode: manual
38+
39+
steps:
40+
- name: Checkout repository
41+
uses: actions/checkout@v4
42+
43+
# Initializes the CodeQL tools for scanning.
44+
- name: Initialize CodeQL
45+
uses: github/codeql-action/init@v3
46+
with:
47+
languages: ${{ matrix.language }}
48+
build-mode: ${{ matrix.build-mode }}
49+
50+
- if: matrix.build-mode == 'manual'
51+
shell: bash
52+
run: |
53+
make build
54+
55+
- name: Perform CodeQL Analysis
56+
uses: github/codeql-action/analyze@v3
57+
with:
58+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)