Skip to content

Commit

Permalink
fix(ci): do not use CodeQL autobuild, build quickly with snapshots (#810
Browse files Browse the repository at this point in the history
)

* fix(ci): only skip CodeQL if build uses snapshot versions

Signed-off-by: Chris Laprun <claprun@redhat.com>

* fix(ci): do not use CodeQL autobuild, build quickly with snapshots

Signed-off-by: Chris Laprun <claprun@redhat.com>

* fix(ci): set up java

Signed-off-by: Chris Laprun <claprun@redhat.com>

---------

Signed-off-by: Chris Laprun <claprun@redhat.com>
  • Loading branch information
metacosm authored Jan 25, 2024
1 parent e5d19c3 commit 80c2eb1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build-for-quarkus-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
repository: ${{ inputs.repository }}

- name: Set up Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ inputs.java-version }}
Expand Down Expand Up @@ -163,6 +163,7 @@ jobs:
echo "JOSDK Fabric8 version: ${{ steps.build-josdk-pr.outputs.josdk_f8_version }}"
echo "Quarkus version: $(mvn help:evaluate -Dexpression=quarkus.version -q -DforceStdout)"
echo "Quarkus Fabric8 version: ${{ steps.build-quarkus-pr.outputs.quarkus_f8_version }}"
echo "Effective Fabric8 version: $(mvn dependency:tree -Dincludes=io.fabric8:kubernetes-client-api -pl core/deployment | grep io.fabric8:kubernetes-client-api -m1 | cut -d ':' -f 4)"
- name: Build with Maven (JVM)
run: mvn -B formatter:validate install -P'${{steps.set-mvn-profiles.outputs.maven_profiles}}' --file pom.xml
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
# only analyze code on main branch
if: github.ref_name == 'main'
permissions:
actions: read
contents: read
Expand All @@ -40,7 +38,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand All @@ -54,19 +52,25 @@ jobs:

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# - name: Autobuild
# uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
cache: 'maven'

#- run: |
# make bootstrap
# make release
- name: Perform quick build
run: |
mvn -Dquickly -Puse-snapshots
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

0 comments on commit 80c2eb1

Please sign in to comment.