Unlike 'jobs.<job_id>.steps.if', the 'jobs.<job_id>.if' doesn't
allow use of the 'env' context.  This breaks the workflow parsing:

   Invalid workflow file: .github/workflows/containers.yml#L18
   The workflow is not valid. .github/workflows/containers.yml
   (Line: 18, Col: 9): Unrecognized named-value: 'env'. Located at
   position 28 within expression:
     github.repository_owner == env.IMAGE_NAMESPACE

Use the name directly, as we do in other workflows.

Fixes: 2e5a69d12849 ("github: Don't run scheduled workflows on forks.")
Signed-off-by: Ilya Maximets <[email protected]>
---
 .github/workflows/containers.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml
index 9c062971e..bfef352a7 100644
--- a/.github/workflows/containers.yml
+++ b/.github/workflows/containers.yml
@@ -15,7 +15,7 @@ env:
 
 jobs:
   container:
-    if: github.repository_owner == env.IMAGE_NAMESPACE
+    if: github.repository_owner == 'ovn-org'
     runs-on: ubuntu-24.04
     strategy:
       matrix:
-- 
2.45.2

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to