Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 3
Message 1 of 2

Bug? Trouble with If Conditional Expression Groupings

Solved! Go to Solution.

Per the docs: https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions

 

I should be able to combine logical groups ().  However, I continue to get errors:

 

    if: |
      (matrix.device == 'mark-one' && matrix.arch == 'imx53' && matrix.boot == 'uSD') \
      || (matrix.device == 'mark-two' && matrix.arch == 'imx6ul' && matrix.boot == 'uSD') \
      || (matrix.device == 'mark-two' && matrix.arch == 'imx6ul' && matrix.boot == 'eMMC') \
      || (matrix.device == 'mark-two' && matrix.arch == 'imx6ull' && matrix.boot == 'uSD') \
      || (matrix.device == 'mark-two' && matrix.arch == 'imx6ull' && matrix.boot == 'eMMC')

### ERRORED 19:12:58Z

- Your workflow file was invalid: The pipeline is not valid. .github/workflows/build-all.yml (Line: 49, Col: 9): Unrecognized named-value: 'matrix'. Located at position 2 within expression: (matrix.device == 'mark-one' && matrix.arch == 'imx53' && matrix.boot == 'uSD') \
|| (matrix.device == 'mark-two' && matrix.arch == 'imx6ul' && matrix.boot == 'uSD') \
|| (matrix.device == 'mark-two' && matrix.arch == 'imx6ul' && matrix.boot == 'eMMC') \
|| (matrix.device == 'mark-two' && matrix.arch == 'imx6ull' && matrix.boot == 'uSD') \
|| (matrix.device == 'mark-two'[...]

 

And the worse of them all, all on one line:

 

if: (matrix.device == 'mark-one' && matrix.arch == 'imx53' && matrix.boot == 'uSD') || (matrix.device == 'mark-two' && matrix.arch == 'imx6ul' && matrix.boot == 'uSD') || (matrix.device == 'mark-two' && matrix.arch == 'imx6ul' && matrix.boot == 'eMMC') || (matrix.device == 'mark-two' && matrix.arch == 'imx6ull' && matrix.boot == 'uSD') || (matrix.device == 'mark-two' && matrix.arch == 'imx6ull' && matrix.boot == 'eMMC')

### ERRORED 19:15:43Z

- Your workflow file was invalid: The pipeline is not valid. .github/workflows/build-all.yml (Line: 49, Col: 9): Unrecognized named-value: 'matrix'. Located at position 2 within expression: (matrix.device == 'mark-one' && matrix.arch == 'imx53' && matrix.boot == 'uSD') || (matrix.device == 'mark-two' && matrix.arch == 'imx6ul' && matrix.boot == 'uSD') || (matrix.device == 'mark-two' && matrix.arch == 'imx6ul' && matrix.boot == 'eMMC') || (matrix.device == 'mark-two' && matrix.arch == 'imx6ull' && matrix.boot == 'uSD') || (matrix.device == 'mark-two' && ma[...]

 

In case you are wondering what I am trying to do (to make sure I am not insane), see this previous Proposal.

1 Reply
Solution
Copilot Lvl 3
Message 2 of 2

Re: Bug? Trouble with If Conditional Expression Groupings

Nevermind.  Appearently it's a bug/feature request to add "matrix" to the "if" conditionals of "jobs."

 

https://github.community/t5/GitHub-Actions/Allow-nesting-matrix-includes/td-p/32240/jump-to/first-un...