Skip to content

Commit

Permalink
Build patched artifacts in codeql workflow (#701)
Browse files Browse the repository at this point in the history
* Build patched artifacts in codeql workflow

* Add cache check
  • Loading branch information
bryan-aguilar authored Jan 9, 2024
1 parent 41f4c50 commit 11a7f8a
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,37 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin

- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: |
~/.m2/repository/io/opentelemetry/
key: ${{ runner.os }}-maven-local-${{ hashFiles('.github/patches/opentelemetry-java*.patch') }}

- name: Publish patched dependencies to maven local
uses: ./.github/actions/patch-dependencies
if: steps.cache-local-maven-repo.outputs.cache-hit != 'true'
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg_password: ${{ secrets.GPG_PASSPHRASE }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: java

- uses: gradle/wrapper-validation-action@v1

- name: Manually build to avoid autobuild failures
run: |
./gradlew build
uses: gradle/gradle-build-action@v2
with:
arguments: build

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

0 comments on commit 11a7f8a

Please sign in to comment.