Skip to content

Commit

Permalink
Created codeql.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
BobbyESP authored Apr 1, 2024
1 parent e474cb1 commit bb12d5d
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/codeql.yml
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}}"

0 comments on commit bb12d5d

Please sign in to comment.