-
hello, I know from this post that the matrix can not be a value from secrets. any thoughts on how to make matrix value can be dynamic, so I don’t need to change the workflow file every time I add a new app? so here’s my current yml file:
actually the django-app list is a directory names inside my project, so I can easily get the names of it, if I can’t set the value from secrets(?) thank you for your help. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Currently, we have no any way to make the values of a matrix parameter can be dynamic. If you want to add new values into the matrix parameter, you have to change the workflow definition every time. You can use the keyword exclude in the matrix job to let job not run for some combinations of the configurations. There is a ticket reported the similar question as reference: https://github.community/t5/GitHub-Actions/Dynamically-Select-Secrets/td-p/42612 |
Beta Was this translation helpful? Give feedback.
-
Im actually really keen on this idea. Im using the matrix to build apps in my mono repo, but ideally I’d only like to build apps that have changed. So im looking for something like: (beware sudo code)
|
Beta Was this translation helpful? Give feedback.
-
You can now build a dynamic matrix with GitHub Actions: New workflow features The GitHub BlogGitHub Actions: New workflow features |
Beta Was this translation helpful? Give feedback.
-
thank you! |
Beta Was this translation helpful? Give feedback.
-
I got dynamic matrix working by passing in a json object. An example here: dockerfiles/ci.yml at 6701b8cffc3b3628ad72b541d2c36ac87e1e9b8f · frezbo/dockerfiles · GitHub |
Beta Was this translation helpful? Give feedback.
You can now build a dynamic matrix with
The GitHub BlogfromJson()
GitHub Actions: New workflow features The GitHub Blog
GitHub Actions: New workflow features