-
Notifications
You must be signed in to change notification settings - Fork 949
45 lines (42 loc) · 1.49 KB
/
codeql-analysis.yml
File metadata and controls
45 lines (42 loc) · 1.49 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
name: CodeQL Analysis
permissions:
contents: read
security-events: write
on:
push:
branches: main
pull_request:
branches: main
schedule:
- cron: 30 23 * * 06
workflow_dispatch:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language:
- go
steps:
- name: Checkout Repository
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- name: Setup Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
cache: false
- name: Initialize CodeQL
uses: github/codeql-action/init@c4fb451437765abf5018c6fbf22cce1a7da1e5cc # codeql-bundle-v2.17.1
with:
languages: "${{ matrix.language }}"
tools: latest
- name: Build
# Used instead of codeql-action/autobuild.
run: |
echo "Building govmomi..." && go build ./ > /dev/null 2>&1 || { echo "error building govmomi"; exit 1; }
echo "Building govc..." && (cd govc && make clean > /dev/null 2>&1 && make all > /dev/null 2>&1) || { echo "error building govc"; exit 1; }
echo "Building vcsim..." && (cd vcsim && make clean > /dev/null 2>&1 && make all > /dev/null 2>&1) || { echo "error building vcsim"; exit 1; }
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@c4fb451437765abf5018c6fbf22cce1a7da1e5cc # codeql-bundle-v2.17.1