Create workflows in stage based on output from previous stage

Summary of the feature request or feedback

What we want to achieve is to build a large number (35-100) of different flavors of the Android application in parallel, but without having to configure each of the flavors separately in the bitrise.yml.

Details of the use-case

Our test pipeline for achieving this looks as follows:

pipelines:
  pipeline_release:
    stages:
    - stage_build: {}
stages:
  stage_build:
    workflows:
    - build_flavor1: {}
    - build_flavor2: {}
    ...
workflows:
  build_flavor1:
    envs:
    - VARIANT: flavor1Release
    after_run:
    - build
  build_flavor2:
    envs:
    - VARIANT: flavor2Release
    after_run:
    - build
  ...

And the build workflow runs Gradle to build the application for the variant supplied by the VARIANT env variable.

However, in our case we have 35+ flavors to be built, and we don’t want to change bitrise.yml each time new flavor is added or removed.

Would there be a possibility to dynamically create workflows of the stage_build stage based on the output of some workflow from the previous stage, that would determine the list of flavors to be built?

Thanks for the suggestion.

Thinking about how you might be able to do this today, one way you could achieve this is to generate your bitrise.yml dynamically and run it using the Bitrise run step