-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (67 loc) · 2.38 KB
/
codeql.yml
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
name: "codeQL"
on:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '37 22 * * 3'
jobs:
create-runner:
environment: google cloud
runs-on: ubuntu-latest
outputs:
label: ${{ steps.create-runner.outputs.label }}
steps:
- id: create-runner
uses: related-sciences/[email protected]
with:
token: ${{ secrets.GH_SA_TOKEN }}
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
#image_project: ubuntu-os-cloud
#image_family: ubuntu-2204-lts
image: projects/github-matfax/global/images/gh-python-ubuntu-2204-jammy-v20230716
machine_zone: europe-north1-b
machine_type: t2d-standard-4
shutdown_timeout: 20
actions_preinstalled: true
boot_disk_type: pd-ssd
analyze:
needs: create-runner
name: analyze
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners
# Consider using larger runners for possible analysis time improvements.
runs-on: ${{ needs.create-runner.outputs.label }}
timeout-minutes: 10
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps:
- name: checkout repository
uses: actions/[email protected]
- name: setting up python
uses: actions/[email protected]
with:
python-version-file: pyproject.toml
- name: initialize CodeQL
uses: github/codeql-action/[email protected]
with:
languages: ${{ matrix.language }}
- name: perform CodeQL analysis
uses: github/codeql-action/[email protected]
with:
category: "/language:${{matrix.language}}"