Skip to main content

validate_deployment_filters

Pre-flight validation for a filtered production task template deployment.

The deployment workflow uploads task templates before it updates projects. This module runs first and fails the job before the first upload, so a filter that names nothing — a slug that does not exist, or a project id belonging to a different task template — stops the run while the hub is still untouched.

It is driven by environment variables rather than arguments because it is invoked from a workflow step that already has them in scope:

CONFIG_FILE the project config file being deployed TASK_TEMPLATE_SLUG the task template slug filter, empty for all PROJECT_ID the project id filter, empty for all TRIAL_NAME the trial name filter, empty for all ACCOUNT the selected account, or 'all' SKIP_TEMPLATE_UPLOAD 'true' when only projects are being updated

Writes has_matching_projects to $GITHUB_OUTPUT so the workflow can skip the project update steps for a template that no project uses.

Module​

Functions​

main​

def main() ‑> None:

Validate the deployment filters, exiting non-zero on any inconsistency.