Skip to main content

Update to Dynamic 'when' Statements in Workflows

Overview

CircleCI is updating the when statement feature in workflows to support conditional logic. This change, effective December 3rd, enables you to run workflows based on pipeline parameters and values.

Important: If you currently use when: always in your workflows, you must update your configuration before this change takes effect.

What's Changing

New Conditional Support

You can now use conditional expressions in when statements at the workflow level. This allows you to control workflow execution based on conditions like:

when: pipelines.git.tag == release

The when: always Value is Being Removed

The string "always" has never been a valid special value for the when key. Previously, it was treated as a non-empty string and evaluated as true, which made it work like removing the when key entirely.

After December 3rd, the string "always" will be interpreted as an expression and fail during config processing.

Required Action

If your config includes when: always, you must remove the when key from your workflows. This provides the same behavior as before.

Note: This change only applies at the workflow level, not the step level. You can continue using the when attribute with the value set to "always" in job steps.

Additional Resources

Did this answer your question?