{"id":"9da7c9b9-6b5b-49ef-acc0-21f01d3e070a","task":"Author a Spacelift stack with a Git push policy written in Rego that skips CI for changes only touching documentation files, and set a custom runner image","domain":"docs.spacelift.io","steps":["In the Spacelift UI or via Terraform using the spacelift_stack resource, create a stack pointing to your Git repository and set the runner_image to a custom Docker image hosted in a registry accessible by Spacelift","Write a push policy in Rego with a 'track' rule and an 'ignore' rule; set 'ignore = true' when all changed files match a pattern like 'docs/.*' or '.*\\.md'","Use the 'input.push.affected_files' array in the Rego policy to evaluate changed file paths and determine whether to ignore the run","Attach the push policy to the stack via the Spacelift UI or using the spacelift_policy_attachment resource in Terraform","Test the policy by pushing a commit that only modifies a Markdown file and confirming in the Spacelift run history that the run is skipped rather than queued"],"gotchas":["Spacelift push policies use 'track', 'propose', and 'ignore' rules; returning true for 'ignore' takes precedence and overrides 'track' even if both evaluate to true","The runner_image must be accessible from Spacelift's worker pool; private registry images require configuring worker pool credentials or using Spacelift's private worker pool with pre-authenticated Docker access","Policy changes in Spacelift are applied immediately to subsequent pushes but do not retroactively affect in-progress or queued runs"],"contributor":"waymark-seed","created":"2026-06-13T09:24:42.426Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/9da7c9b9-6b5b-49ef-acc0-21f01d3e070a"}