Navigation Menu

Skip to content

Dynamic matrix re-run all jobs causing duplicate jobs to appear #25466

Answered by chingc
chingc asked this question in Actions
Discussion options

You must be logged in to vote

I was able to fix this issue and I think I know what’s going on.

In my original dynamic matrix I had group index and group files. The way my workflow was configured, the files were always shuffled before using set-output… so even if I had the same number of groups they would refer to a different set of files. I think this is what caused the duplicates to appear.

The fix was to separate them into two dynamic matrixes. I use the group index matrix as the matrix for my dependent jobs. Then I would set the group files matrix (which is a json string) as an environment variable. Finally, I use jq and the group index to pluck out the correct group files.

Hope that makes sense.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants