I have declared my parameters like so
parameters:
workflow:
type: enum
enum: [build, terraform_import_resources]
default: build
workflows:
version: 2
build:
when:
and:
- equal: [ "", << pipeline.schedule.id >> ] # To run build workflow if the source is not a scheduled build.
- equal: [ false, equal : [ terraform_import_resources, << pipeline.parameters.workflow >> ]]
terraform_import_resources:
when:
equal: [ terraform_import_resources, << pipeline.parameters.workflow >> ]
Since the default workflow is build, whenever I do a git push
, build will run. Is there a way to pass terraform_import_resources
in pipeline.parameters.workflow
when I do a git push
so that this workflow will run?