New to Kestra?
Use blueprints to kickstart your first workflows.
Automate hourly Git syncs of Kestra flows and namespace files. Keep environments consistent, version-controlled, and ready for GitOps deployments.
Keep your Kestra environment in lockstep with a Git repository by pulling flows and namespace files on an hourly schedule. This blueprint implements a GitOps workflow that promotes changes from main into a target Kestra instance automatically, so engineers commit YAML and supporting files in Git and Kestra picks them up without manual deploys, copy/paste, or CLI runs. It is the foundation for CI/CD with Kestra, multi-environment promotion (dev to staging to prod), and disaster recovery, where Git is the single source of truth for orchestration code.
every_full_hour trigger of type io.kestra.plugin.core.trigger.Schedule fires every hour at minute zero using the cron expression 0 * * * *.sync_flows task (io.kestra.plugin.git.SyncFlows) clones the configured url at the given branch, reads YAML files from gitDirectory: flows, and reconciles them into targetNamespace: git with includeChildNamespaces: true and delete: true so removed files in Git are also removed in Kestra.sync_namespace_files task (io.kestra.plugin.git.SyncNamespaceFiles) syncs the _files directory from the same repository into the prod namespace as namespace files, again with delete: true to keep parity.dryRun: true by default so you can review the planned changes in the execution logs before flipping the flag to apply them.username: git_username and a token resolved from {{ secret('GITHUB_ACCESS_TOKEN') }}.dryRun showing exactly which flows would be created, updated, or deleted.Git itself has no scheduler and no concept of deploying YAML into a running orchestrator. Cron on a build server can pull repositories, but it has no native awareness of Kestra namespaces, no dry run preview, no structured logs per file, and no retries tied to a workflow engine. With Kestra, the sync runs as a first-class flow: you get scheduled and event-based triggers, automatic retries, full execution lineage, declarative YAML configuration, and visibility into every applied change. You can also extend the trigger to react to Git webhooks, pull request merges, or upstream CI completions, turning the same logic into a continuous deployment pipeline.
plugin-git plugin available.flows/ directory and arbitrary files under _files/.GITHUB_ACCESS_TOKEN: a GitHub personal access token (or equivalent) with read access to the repository.url at your own Git repository that holds Kestra flows.GITHUB_ACCESS_TOKEN secret in Kestra.targetNamespace, namespace, and gitDirectory values to match your layout.dryRun: true and inspect the logs for planned changes.dryRun: false on both tasks to apply changes on the next scheduled run.Schedule trigger with a webhook trigger to deploy on every push or merge.Subflow step that runs validation or linting before sync.branch and targetNamespace via flow inputs.Throttle or approval task before applying to production namespaces.