Use custom_payload to generate matrix #25147
-
We want to set matrix dynamicaly, based on some conditions. This code:
returns this error: As we can see it is possible to set matrix variables using |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments
-
Hi @kerizer , I can repro the same on my side. Currently it’s not supported to set dynamic matrix value, you have to set the exact value for matrix. It’s answered in the similar ticket. Thanks. |
Beta Was this translation helpful? Give feedback.
-
But it’s clear that it starts 4 jobs and use correct values in |
Beta Was this translation helpful? Give feedback.
-
What does your payload look like? Are you trying to pass a delimited string or is it a proper JSON array? |
Beta Was this translation helpful? Give feedback.
-
Here is an example that works for me. Workflow that triggers the repositor_dispatch
Workflow that recieves it
Successfule run https://github.com/chrispat/multi-ci-test/actions/runs/68415548 |
Beta Was this translation helpful? Give feedback.
-
Unless I’m reading it wrong, it looks like that build was run on build rather than build-2. It also ran on macos-latest which your trigger job does not specify. |
Beta Was this translation helpful? Give feedback.
-
Now it looks as fixed. Please check my workflow: https://github.com/weide-zhou/ticket17/actions/runs/69528670 Please check your workflow again, thanks. |
Beta Was this translation helpful? Give feedback.
-
I cleaned up the example a little so I don’t have so many duplicate things on the same commit. This one clearly ran only two jobs https://github.com/chrispat/multi-ci-test/actions/runs/69926570. |
Beta Was this translation helpful? Give feedback.
-
That looks awesome! Thank you :slight_smile: |
Beta Was this translation helpful? Give feedback.
Hi @kerizer @bo98 ,
Now it looks as fixed. Please check my workflow: https://github.com/weide-zhou/ticket17/actions/runs/69528670
Please check your workflow again, thanks.