CI: restrict test-maven-packages workflow to main repo only

Adds github.repository guards to all three jobs so the workflow
does not evaluate in forks, preventing spurious "workflow file issue"
failures on push events in forked repositories.
This commit is contained in:
M. Scot Breitenfeld
2026-06-16 10:04:56 -05:00
parent 263cd26c0b
commit cc1208226d
+9 -5
View File
@@ -54,8 +54,10 @@ jobs:
name: Test JNI Maven Package
runs-on: ubuntu-latest
if: |
inputs.java_implementation == 'both' ||
inputs.java_implementation == 'jni'
github.repository == 'HDFGroup/hdf5' && (
inputs.java_implementation == 'both' ||
inputs.java_implementation == 'jni'
)
steps:
- name: Checkout HDF5 repository (contains HDF5Examples)
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
@@ -322,8 +324,10 @@ jobs:
name: Test FFM Maven Package
runs-on: ubuntu-latest
if: |
inputs.java_implementation == 'both' ||
inputs.java_implementation == 'ffm'
github.repository == 'HDFGroup/hdf5' && (
inputs.java_implementation == 'both' ||
inputs.java_implementation == 'ffm'
)
steps:
- name: Checkout HDF5 repository (contains HDF5Examples)
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
@@ -591,7 +595,7 @@ jobs:
name: Test Summary
runs-on: ubuntu-latest
needs: [test-jni-package, test-ffm-package]
if: always()
if: always() && github.repository == 'HDFGroup/hdf5'
steps:
- name: Check test results
env: