forked from gastownhall/gascity
-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (71 loc) · 2.47 KB
/
codeql.yml
File metadata and controls
78 lines (71 loc) · 2.47 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
name: CodeQL
on:
push:
branches: [main]
pull_request:
branches: [main]
types:
- opened
- reopened
- synchronize
- ready_for_review
schedule:
- cron: "24 4 * * 1"
workflow_dispatch:
permissions:
actions: read
contents: read
security-events: write
jobs:
runner-policy:
name: Runner policy
runs-on: ${{ github.event_name == 'pull_request' && contains(fromJSON('["julianknutsen","csells","sjarmak","quad341"]'), github.event.pull_request.user.login) && 'blacksmith-2vcpu-ubuntu-2404' || 'ubuntu-latest' }}
outputs:
use_blacksmith: ${{ steps.policy.outputs.use_blacksmith }}
reason: ${{ steps.policy.outputs.reason }}
runner_2vcpu: ${{ steps.policy.outputs.runner_2vcpu }}
runner_8vcpu: ${{ steps.policy.outputs.runner_8vcpu }}
runner_16vcpu: ${{ steps.policy.outputs.runner_16vcpu }}
runner_32vcpu: ${{ steps.policy.outputs.runner_32vcpu }}
runner_macos: ${{ steps.policy.outputs.runner_macos }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Select runner backend
id: policy
env:
EVENT_NAME: ${{ github.event_name }}
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
run: |
python3 .github/workflows/scripts/runner_policy.py
analyze:
name: Analyze (${{ matrix.language }})
needs: runner-policy
runs-on: ${{ needs.runner-policy.outputs.runner_16vcpu }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: go
build-mode: autobuild
- language: javascript-typescript
build-mode: none
- language: python
build-mode: none
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Initialize CodeQL
uses: github/codeql-action/init@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- name: Autobuild
if: matrix.build-mode == 'autobuild'
uses: github/codeql-action/autobuild@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
with:
category: "/language:${{ matrix.language }}"