Why is my when.changeset condition not skipping builds after a push?
Last updated: August 21, 2026
Context
When configuring a push-triggered workflow in codemagic.yaml with a when.changeset condition, you may notice that builds are still triggered even when the changed files do not match the includes patterns or are explicitly covered by the excludes patterns. This can be confusing if you expect the changeset filter to immediately skip irrelevant builds.
Answer
This behavior is expected. The first build after adding or updating a when.changeset configuration will always be triggered, regardless of the changeset condition. This initial build is required for Codemagic to pick up and register the new changeset configuration.
Once that first build completes successfully, all subsequent builds will be evaluated against the when.changeset condition. Builds that do not match the configured includes/excludes patterns will be skipped as expected.
To verify that your changeset configuration is working correctly after the initial build, follow these steps:
Add or update the
when.changesetconfiguration in yourcodemagic.yamlfile.Allow the first triggered build to complete successfully — this registers the new configuration with Codemagic.
Push a change that only modifies files covered by your
excludespatterns (or files not matched byincludes).Confirm that no new build is triggered for that push.
For more details on configuring automatic build triggers and changeset conditions, refer to the Codemagic documentation on starting builds automatically.