Skip to content

Commit

Permalink
CodeQL workflow for Java (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
cko-developer-portal[bot] authored Oct 6, 2023
1 parent acd5902 commit fb2a560
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: "CodeQL"

on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
types: [ opened, synchronize, reopened ]
branches: [ master, "bugfix/*", "feature/*", "release/*" ]
schedule:
- cron: '34 2 * * 0'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
analyze:
name: Code Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'java' ]

steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
submodules: recursive

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: corretto
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
queries: security-and-quality

- name: Build with Gradle
run: ./gradlew :app:build

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

0 comments on commit fb2a560

Please sign in to comment.