Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build patched artifacts in codeql workflow #701

Merged
merged 2 commits into from
Jan 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member

@PaurushGarg PaurushGarg Jan 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bryan-aguilar should we have a if condition here, like below to avoid running this step if the cache is found?
if: steps.cache-local-maven-repo.outputs.cache-hit != 'true'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

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
Loading