-
-
Notifications
You must be signed in to change notification settings - Fork 133
93 lines (79 loc) · 2.78 KB
/
codeql-analysis.yaml
File metadata and controls
93 lines (79 loc) · 2.78 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
name: 'Code scanning - action'
defaults:
run:
shell: bash
on:
# push:
# branches: [develop, ]
# pull_request:
# # The branches below must be a subset of the branches above
# branches: [develop]
schedule:
- cron: '0 6 * * 5'
jobs:
config:
uses: ./.github/workflows/reusable-config.yaml
CodeQL-Build:
runs-on: ubuntu-22.04
needs: config
env:
LIBCURL_RELEASE: ${{ needs.config.outputs.latest-libcurl-release }}
LATEST_LIBCURL_RELEASE: ${{ needs.config.outputs.latest-libcurl-release }}
ELECTRON_VERSION: ''
PUBLISH_BINARY: false
RUN_TESTS: false
RUN_PREGYP_CLEAN: false
GIT_COMMIT: ${{ github.sha }}
GIT_REF_NAME: ${{ github.ref_name }}
steps:
- name: Checkout
uses: actions/checkout@v5
with:
submodules: true
- name: Install System Packages
uses: ./.github/actions/install-system-packages
# see https://github.com/nodejs/node/issues/40537
# - name: Enforce IPv4 Connectivity
# uses: ./.github/actions/force-ipv4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: javascript, cpp
# PNPM / Node.js
- name: Setup Node and PNPM
uses: ./.github/actions/setup-node-pnpm
with:
node-version: '24'
- name: Setup Libcurl Cache (Restore)
id: libcurl-deps-cache
uses: ./.github/actions/setup-libcurl-cache
with:
libcurl-release: ${{ needs.config.outputs.latest-libcurl-release }}
node-version: '24'
electron-version: ''
electron-config-cache: ${{ needs.config.outputs.electron-config-cache }}
mode: 'restore-only'
- name: 'Build and Package Binary'
run: ./scripts/ci/build.sh
- name: 'Check if fully installed and built'
id: built-and-installed
run: |
if [[ -f built-and-installed.hidden.txt ]]; then
echo "built-and-installed.hidden.txt exists"
echo "status=true" >> $GITHUB_OUTPUT
else
echo "built-and-installed.hidden.txt does not exist"
echo "status=false" >> $GITHUB_OUTPUT
fi
- name: Setup Libcurl Cache (Save)
if: steps.libcurl-deps-cache.outputs.cache-hit != 'true' && steps.built-and-installed.outputs.status == 'true'
uses: ./.github/actions/setup-libcurl-cache
with:
libcurl-release: ${{ needs.config.outputs.latest-libcurl-release }}
node-version: '24'
electron-version: ''
electron-config-cache: ${{ needs.config.outputs.electron-config-cache }}
mode: 'save-only'
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4