-
Notifications
You must be signed in to change notification settings - Fork 3
89 lines (79 loc) · 2.56 KB
/
codeql.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
79
80
81
82
83
84
85
86
87
88
89
#
# SPDX-FileCopyrightText: 2023 Lifely
# SPDX-License-Identifier: EUPL-1.2+
#
name: "CodeQL"
on:
pull_request:
branches: [main]
merge_group:
schedule:
- cron: "21 11 * * 0"
env:
JAVA_VERSION: "21"
jobs:
paths-ignore:
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.paths-ignore.outputs.skip }}
steps:
- name: Skip job when only Markdown files are changed
uses: kunitsucom/github-actions-paths-ignore-alternative@3800eba25a9d716029cd1db0439cb9194431cc5c # v0.0.4
id: paths-ignore
with:
paths-ignore: |-
^.*\.md$
^helm/
analyze:
name: Analyze
runs-on: ubuntu-latest
needs: paths-ignore
if: ${{ needs.paths-ignore.outputs.skip != 'true' }}
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ["java-kotlin", "javascript-typescript"]
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup JDK
if: matrix.language == 'java-kotlin'
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: "temurin"
- name: Setup Gradle
if: matrix.language == 'java-kotlin'
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4.2.2
- name: Initialize CodeQL
uses: github/codeql-action/init@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
with:
category: "/language:${{matrix.language}}"
check_codeql_status:
name: Check CodeQL Status
needs:
- analyze
- paths-ignore
runs-on: ubuntu-latest
permissions:
contents: read
checks: read
pull-requests: read
if: ${{ needs.paths-ignore.outputs.skip != 'true' && github.event_name == 'pull_request' }}
steps:
- name: Check CodeQL Status
uses: eldrick19/code-scanning-status-checker@868f78ef588214f12e365604583b7673d18941ce # v2.0.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
pr_number: ${{ github.event.pull_request.number }}
repo: ${{ github.repository }}