Merge pull request #651 from eclipse/dependabot/github_actions/step-s… #298
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
#******************************************************************************* | |
# Copyright (c) Contributors to the Eclipse Foundation | |
# | |
# This program and the accompanying materials are made available under the | |
# terms of the Eclipse Public License 2.0 which is available at | |
# http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 | |
# which is available at https://www.apache.org/licenses/LICENSE-2.0. | |
# | |
# SPDX-License-Identifier: (EPL-2.0 OR Apache-2.0) | |
#******************************************************************************* | |
name: 'CodeQL' | |
on: | |
push: | |
branches-ignore: | |
- 'dependabot/**' | |
paths: | |
- '**.java' | |
- '.github/**/*codeql*' | |
pull_request: | |
paths: | |
- '**.java' | |
- '.github/**/*codeql*' | |
env: | |
LC_ALL: en_US.UTF-8 | |
GRADLE_OPTS: >- | |
-Dorg.gradle.parallel=true | |
MAVEN_OPTS: >- | |
-Dhttp.keepAlive=false | |
-Dmaven.wagon.http.pool=false | |
-Dmaven.wagon.http.retryHandler.count=3 | |
defaults: | |
run: | |
shell: bash | |
permissions: | |
contents: read | |
jobs: | |
analyze: | |
permissions: | |
security-events: write # for github/codeql-action/analyze to upload SARIF results | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- 'ubuntu-latest' | |
java: | |
- '17' | |
name: CodeQL JDK${{ matrix.java }} ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@446798f8213ac2e75931c1b0769676d927801858 # v2.10.0 | |
with: | |
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs | |
- name: Checkout repository | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Set up Java ${{ matrix.java }} | |
uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88 # v4.3.0 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ matrix.java }} | |
- name: Initialize CodeQL Analysis | |
uses: github/codeql-action/init@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6 | |
with: | |
languages: 'java' | |
- name: Build for CodeQL Analysis | |
id: build | |
run: | | |
./.github/scripts/codeql-build.sh | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6 |