Skip to content

Commit

Permalink
github: containers: Fix job condition.
Browse files Browse the repository at this point in the history
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: 2e5a69d ("github: Don't run scheduled workflows on forks.")
Signed-off-by: Ilya Maximets <[email protected]>
  • Loading branch information
igsilya committed Aug 12, 2024
1 parent f0a3681 commit a77a019
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a77a019

Please sign in to comment.