Dependency management #427
Workflow file for this run
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
name: "CodeQL" | |
env: | |
MAVEN_OPTS: -Djava.awt.headless=true | |
MAVEN_VERSION: '3.9.7' | |
concurrency: # More info: https://stackoverflow.com/a/68422069/253468 | |
group: ${{ github.workflow }}-${{ ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/release' ) && format('ci-master-{0}', github.sha) || format('ci-master-{0}', github.ref) }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
paths-ignore: | |
- '**/*.md' | |
- '**/*.txt' | |
- '**/*.properties' | |
schedule: | |
- cron: '26 18 * * 0' | |
workflow_dispatch: | |
jobs: | |
analyze: | |
name: "CodeQL Analyze" | |
runs-on: ubuntu-latest | |
# don't run on pull request merges to main from dependabot as these will always fail | |
if: ${{ github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/main' }} | |
permissions: | |
security-events: write | |
actions: read | |
contents: read | |
strategy: | |
fail-fast: false | |
matrix: | |
language: [ 'java' ] | |
steps: | |
- name: "Checkout repository" | |
uses: actions/checkout@v4 | |
- name: 'Set up JDK' | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: 'Set up Maven' | |
uses: stCarolas/setup-maven@v5 | |
with: | |
maven-version: ${{ env.MAVEN_VERSION }} | |
- name: "Initialize CodeQL" | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: ${{ matrix.language }} | |
- name: "Build with Maven" | |
run: mvn -B -V -fae -DskipTests -DskipITs -DskipQA=true -Dmaven.javadoc.skip=true -Ddocker.skip=true install | |
- name: "Perform CodeQL Analysis" | |
uses: github/codeql-action/analyze@v3 | |
- name: "Cleanup cached snapshots" | |
run: | | |
find ~/.m2/repository -name "*SNAPSHOT*" -type d | xargs rm -rf {} | |