-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: "CodeQL" | ||
|
||
# Triggers for when this workflow should run | ||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
# Scheduled run every Friday at 12:41 UTC | ||
schedule: | ||
- cron: '41 12 * * 5' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze (${{ matrix.language }}) | ||
|
||
# Define the operating system for the job (macOS for Swift, Ubuntu for others) | ||
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} | ||
|
||
# Define timeout for the job based on the language (2 hours for Swift, 6 hours for others) | ||
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} | ||
|
||
# Define permissions required for the job | ||
permissions: | ||
security-events: write | ||
actions: read | ||
contents: read | ||
|
||
# Define the matrix strategy for different languages | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- language: java-kotlin | ||
|
||
# Define steps for the job | ||
steps: | ||
# Checkout the repository content | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
# Set up JDK 17 for Java analysis | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '17' | ||
|
||
# Initialize CodeQL tools for scanning | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v3 | ||
with: | ||
languages: ${{ matrix.language }} | ||
build-mode: autobuild | ||
|
||
# Perform CodeQL analysis | ||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v3 | ||
with: | ||
category: "/language:${{matrix.language}}" |