It's been a while since we had some practical materials here.
So, here's an article that helped me a lot today. It's about how to split outputs of a GitHub Actions step into an array that is suitable for a matrix property of a GHA job.
You see, the problem is that GHA don't have a native "split" functionality. So, you need a way to work around it. Moreover, that fromJson() function is important there, 'coz otherwise it doesn't work.
This could be useful if you need to run multiple jobs based on, for example, changed files. Also, here's a bonus article on how to get the changed files in GHA without 3rd party Actions.
P.S. Well... One can hate Jenkins until they need to write some more or less custom logic in a YAML-based CI.
#github #cicd
Post #2038
2.02K