-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (86 loc) · 2.82 KB
/
Copy pathcodeql.yml
File metadata and controls
95 lines (86 loc) · 2.82 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: CodeQL Advanced
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '0 6 * * 3' # Weekly Wednesday 6am UTC
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
security-events: write
jobs:
changes:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
outputs:
swift: ${{ steps.filter.outputs.swift }}
c-cpp: ${{ steps.filter.outputs.c-cpp }}
actions: ${{ steps.filter.outputs.actions }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4
id: filter
with:
filters: |
swift:
- '**/*.swift'
- 'Package.swift'
c-cpp:
- '**/*.c'
- '**/*.h'
actions:
- '.github/workflows/**'
analyze-swift:
name: Analyze (swift)
needs: changes
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || needs.changes.outputs.swift == 'true'
runs-on: macos-26
timeout-minutes: 60
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: github/codeql-action/init@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
with:
languages: swift
build-mode: manual
- run: swift build --arch arm64
- uses: github/codeql-action/analyze@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
with:
category: "/language:swift"
analyze-cpp:
name: Analyze (c-cpp)
needs: changes
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || needs.changes.outputs.c-cpp == 'true'
runs-on: macos-26
timeout-minutes: 60
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: github/codeql-action/init@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
with:
languages: c-cpp
build-mode: manual
- run: swift build --arch arm64
- uses: github/codeql-action/analyze@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
with:
category: "/language:c-cpp"
analyze-actions:
name: Analyze (actions)
needs: changes
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || needs.changes.outputs.actions == 'true'
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: github/codeql-action/init@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
with:
languages: actions
build-mode: none
- uses: github/codeql-action/analyze@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
with:
category: "/language:actions"