forked from cilium/cilium
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (51 loc) · 1.43 KB
/
lint-codeql.yaml
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
name: CodeQL
on:
pull_request:
branches:
- main
- ft/main/**
push:
branches:
- main
- ft/main/**
schedule:
- cron: "45 6 * * 3"
permissions: read-all
jobs:
check_changes:
name: Deduce required tests from code changes
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
outputs:
go-changes: ${{ steps.go-changes.outputs.src }}
steps:
- name: Check code changes
uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
id: go-changes
with:
filters: |
src:
- .github/workflows/lint-codeql.yaml
- '**/*.go'
- 'go.mod'
- 'go.sum'
analyze:
needs: check_changes
if: ${{ needs.check_changes.outputs.go-changes == 'true' || github.event_name != 'pull_request' }}
name: Analyze
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Checkout repo
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
persist-credentials: false
fetch-depth: 1
- name: Initialize CodeQL
uses: github/codeql-action/init@00e563ead9f72a8461b24876bee2d0c2e8bd2ee8 # v2.21.5
with:
languages: go
debug: true
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@00e563ead9f72a8461b24876bee2d0c2e8bd2ee8 # v2.21.5