forked from smartcontractkit/chainlink
-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (71 loc) · 2.53 KB
/
codeql-analysis.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
72
73
74
75
76
77
78
name: 'CodeQL'
on:
push:
branches:
- develop
pull_request:
# The branches below must be a subset of the branches above
branches: [develop]
schedule:
- cron: '23 19 * * 4'
jobs:
filter:
name: Detect Changes
permissions:
pull-requests: read
outputs:
should-run-go: ${{ steps.changes.outputs.go-changes == 'true' || steps.changes.outputs.workflow-changes == 'true' || github.event == 'schedule' }}
should-run-js: ${{ steps.changes.outputs.js-changes == 'true' || steps.changes.outputs.workflow-changes == 'true' || github.event == 'schedule' }}
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/[email protected]
with:
repository: smartcontractkit/chainlink
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes
with:
filters: |
go-changes:
- '**/*.go'
- '**/go.mod'
- '**/go.sum'
js-changes:
- '**/package.json'
- '**/pnpm-lock.yaml'
- '**/*.js'
- '**/*.ts'
workflow-changes:
- '.github/workflows/codeql-analysis.yml'
analyze:
needs: filter
name: Analyze ${{ matrix.type.language }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
type:
- language: 'go'
should-run: ${{ needs.filter.outputs.should-run-go }}
- language: 'javascript'
should-run: ${{ needs.filter.outputs.should-run-js }}
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Set up Go
if: ${{ matrix.type.language == 'go' && matrix.type.should-run == 'true' }}
uses: ./.github/actions/setup-go
with:
go-version-file: 'go.mod'
only-modules: 'true'
- name: Touching core/web/assets/index.html
if: ${{ matrix.type.language == 'go' && matrix.type.should-run == 'true' }}
run: mkdir -p core/web/assets && touch core/web/assets/index.html
- name: Initialize CodeQL
if: ${{ matrix.type.should-run == 'true' }}
uses: github/codeql-action/init@65c74964a9ed8c44ed9f19d4bbc5757a6a8e9ab9 # codeql-bundle-v2.16.1
with:
languages: ${{ matrix.type.language }}
- name: Perform CodeQL Analysis
if: ${{ matrix.type.should-run == 'true' }}
uses: github/codeql-action/analyze@65c74964a9ed8c44ed9f19d4bbc5757a6a8e9ab9 # codeql-bundle-v2.16.1