Repository navigation
49 lines (44 loc) · 1.46 KB
/
Copy pathcodeql.yml
File metadata and controls
49 lines (44 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# CodeQL on every pull request and on main. An advanced setup without a
# build (build-mode none): the engine's build needs toolchains only the
# self-hosted runner has, and that runner never runs a fork's code, so the
# analysis reads the sources on a hosted runner instead.
name: codeql
on:
push:
branches: [main]
pull_request:
schedule:
- cron: "41 8 * * 0"
permissions: {}
defaults:
run:
shell: bash
jobs:
analyze:
runs-on: ubuntu-24.04
timeout-minutes: 60
permissions:
contents: read
security-events: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
with:
languages: c-cpp
build-mode: none
# Vendored code is upstream's.
config: |
paths-ignore:
- third_party
- uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
with:
category: /language:c-cpp
# Each analysis on main saves its TRAP cache by commit; only the newest is kept.
prune-caches:
needs: [analyze]
if: always() && github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
uses: Rawframe-Project/.github/.github/workflows/cache-prune.yml@8414d388d2116b581c5c5d8f6641e1da4d863244 # v0.0.42
permissions:
actions: write