Skip to content

Commit 1b31d70

Browse files
Update codeql-analysis.yml
1 parent 26e01da commit 1b31d70

File tree

1 file changed

+41
-4
lines changed

1 file changed

+41
-4
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ on:
2424
jobs:
2525
analyze:
2626
name: Analyze
27-
runs-on: 'macos-latest'
28-
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
27+
runs-on: [self-hosted, 1ES.Pool=1es-ubuntu-msgraph-beta-sdk-java-mem-latest]
28+
#timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
2929
permissions:
3030
actions: read
3131
contents: read
@@ -42,11 +42,48 @@ jobs:
4242

4343
steps:
4444
- name: Checkout repository
45-
uses: actions/checkout@v4
45+
uses: actions/checkout@v3
4646

4747
- name: Set up JDK
48-
uses: actions/setup-java@v4
48+
uses: actions/setup-java@v3
4949
with:
5050
java-version: 20
5151
distribution: 'temurin'
5252
cache: gradle
53+
54+
# Initializes the CodeQL tools for scanning.
55+
- name: Initialize CodeQL
56+
uses: github/codeql-action/init@v2
57+
with:
58+
languages: ${{ matrix.language }}
59+
threads: 4
60+
#ram: 8384
61+
62+
# If you wish to specify custom queries, you can do so here or in a config file.
63+
# By default, queries listed here will override any specified in a config file.
64+
# Prefix the list here with "+" to use these queries and those in the config file.
65+
66+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
67+
# queries: security-extended,security-and-quality
68+
69+
70+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
71+
# If this step fails, then you should remove it and run the build manually (see below)
72+
# - name: Autobuild
73+
# uses: github/codeql-action/autobuild@v2
74+
75+
# ℹ️ Command-line programs to run using the OS shell.
76+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
77+
78+
# If the Autobuild fails above, remove it and uncomment the following three lines.
79+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
80+
81+
- name: Grant execute permission for gradlew
82+
run: chmod +x gradlew
83+
- name: Build with Gradle
84+
run: ./gradlew clean build "-Dorg.gradle.jvmargs=-Xmx2g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError" -Dfile.encoding=UTF-8
85+
86+
- name: Perform CodeQL Analysis
87+
uses: github/codeql-action/analyze@v2
88+
with:
89+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)