In the Yaml file, You can add a condition to the task that updates the build number to check if a variable is set to false. If the variable is false, the task will be skipped.