Can you check Environment Variables in the "when" block?


I was wondering if we could use the when block to check if an environment variable is set?
e.g. checking the SEMAPHORE_WORKFLOW_TRIGGERED_BY_SCHEDULE to only run a block when it is the scheduler, or run a certain block only when it is not the scheduler?


Hi @Rory ,

I think I have replied to you through another channel but I’ll leave the answer here for future consulting purposes. :slight_smile:

It’s not possible to use the when block with environment variables. However, it is under consideration.

Don’t hesitate to let us know if you have any additional questions or feedback!