CI: Update conditional triggers, pass JDK21 41/142441/1
authorMatthew Watkins <mwatkins@linuxfoundation.org>
Fri, 14 Nov 2025 11:47:37 +0000 (11:47 +0000)
committerMatthew Watkins <mwatkins@linuxfoundation.org>
Fri, 14 Nov 2025 11:47:37 +0000 (11:47 +0000)
The notify job is sometimes triggering when it should be skipped.
Also, it looks like this project requires OpenJDK 21 to build.

Change-Id: Idc0a5d6640ba0cfe9ba7c76d8f0793e361353580
Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
.github/workflows/gerrit-merge-cbom.yaml

index d7616fd..853e97d 100644 (file)
@@ -56,6 +56,7 @@ concurrency:
 
 jobs:
   notify:
+    if: github.event_name == 'workflow_dispatch'
     runs-on: ubuntu-latest
     steps:
       # Harden the runner used by this workflow
@@ -81,6 +82,7 @@ jobs:
   cbom-create:
     name: 'Generate PQCA CBOM'
     runs-on: ubuntu-latest
+    if: always()
     needs: [notify]
     permissions:
       contents: write
@@ -214,7 +216,7 @@ jobs:
         # yamllint disable-line rule:line-length
         uses: lfreleng-actions/maven-build-action@main
         with:
-          jdk-version: '17'
+          jdk-version: '21'
           distribution: 'temurin'
           mvn-version: '3.8.2'
           mvn-phases: 'clean package'
@@ -244,7 +246,7 @@ jobs:
           if-no-files-found: warn
 
   report-status:
-    if: ${{ always() }}
+    if: ${{ always() && github.event_name == 'workflow_dispatch' }}
     needs: [notify, cbom-create]
     runs-on: ubuntu-latest
     steps: