Skip to content

Commit 5037660

Browse files
committed
fix CodeQL workflow
1 parent 37c743a commit 5037660

File tree

1 file changed

+28
-20
lines changed

1 file changed

+28
-20
lines changed

.github/workflows/codeql.yaml

+28-20
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "CodeQL"
1+
name: CodeQL
22

33
on:
44
push:
@@ -10,39 +10,47 @@ on:
1010
- cron: '41 21 * * 5'
1111
workflow_dispatch:
1212

13-
# This environment is necessary to avoid the following issue
14-
# https://github.com/github/codeql/issues/6321
15-
env:
16-
CODEQL_EXTRACTOR_GO_BUILD_TRACING: 'on'
13+
permissions:
14+
security-events: write
1715

1816
jobs:
19-
analyze:
20-
name: Analyze
17+
analyze-go:
18+
name: Analyze Go
2119
runs-on: ubuntu-latest
22-
permissions:
23-
actions: read
24-
contents: read
25-
security-events: write
26-
strategy:
27-
fail-fast: false
28-
matrix:
29-
language: ['go', 'javascript']
3020
steps:
3121
- uses: actions/checkout@v4
3222
- uses: actions/setup-go@v5
3323
with:
3424
go-version: '1.23'
35-
if: ${{ matrix.language == 'go' }}
3625
- uses: github/codeql-action/init@v3
3726
with:
3827
config-file: ./.github/codeql/codeql-config.yaml
39-
languages: ${{ matrix.language }}
40-
- uses: github/codeql-action/autobuild@v3
41-
if: ${{ matrix.language != 'go' }}
28+
languages: go
4229
- name: Build Go sources
4330
run: |
4431
set -x
4532
go build -v ./cmd/actionlint
4633
GOOS=js GOARCH=wasm go build -v -o ./playground/main.wasm ./playground
47-
if: ${{ matrix.language == 'go' }}
4834
- uses: github/codeql-action/analyze@v3
35+
with:
36+
category: "/language:go"
37+
analyze-ts:
38+
name: Analyze TypeScript
39+
runs-on: ubuntu-latest
40+
defaults:
41+
run:
42+
working-directory: ./playground
43+
steps:
44+
- uses: actions/checkout@v4
45+
- uses: actions/setup-node@v4
46+
with:
47+
node-version: "lts/*"
48+
- uses: github/codeql-action/init@v3
49+
with:
50+
config-file: ./.github/codeql/codeql-config.yaml
51+
languages: javascript-typescript
52+
- name: Build playground
53+
run: make build
54+
- uses: github/codeql-action/analyze@v3
55+
with:
56+
category: "/language:javascript-typescript"

0 commit comments

Comments
 (0)