Message ID | 20240812110139.631261-1-i.maximets@ovn.org |
---|---|
State | Accepted |
Headers | show |
Series | [ovs-dev] github: containers: Fix job condition. | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | success | apply and check: success |
ovsrobot/github-robot-_Build_and_Test | success | github build: passed |
ovsrobot/github-robot-_ovn-kubernetes | success | github build: passed |
On 8/12/24 13:01, Ilya Maximets wrote: > 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 <i.maximets@ovn.org> > --- Looks good to me, thanks! Applied to main and 24.09 to unblock CI. Regards, Dumitru
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:
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 <i.maximets@ovn.org> --- .github/workflows/containers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)