Skip to content

Commit 6aa55b8

Browse files
authored
Merge pull request #11905 from B-a-S/main
Prevent runs NVIDIA_CI in case triggered by PR in the fork
2 parents 59359ef + 63e25b4 commit 6aa55b8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/ompi_nvidia.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
name: ompi_NVIDIA CI
22
on: [pull_request]
33
jobs:
4+
45
deployment:
6+
if: github.repository == 'open-mpi/ompi'
57
runs-on: [self-hosted, linux, x64, nvidia]
68
steps:
79
- name: Checkout
@@ -28,7 +30,11 @@ jobs:
2830
- name: Running tests
2931
run: /start test
3032
clean:
31-
if: ${{ always() }}
33+
# always() should be used to run "clean" even when the workflow was canceled
34+
# ( in case of the right repository name)
35+
# The second condition doesn't work when the workflow was canceled
36+
37+
if: always() && (github.repository == 'open-mpi/ompi')
3238
needs: [deployment, build, test]
3339
runs-on: [self-hosted, linux, x64, nvidia]
3440
steps:

0 commit comments

Comments
 (0)