Blueprints

Push code to Git at regular intervals

About this blueprint

Git System Trigger

This flow will push code to Git every 15 minutes.

We will be using PushFlows and PushNamespaceFiles task to push flows and namespace files respectively.

yaml
id: push_to_git
namespace: company.team

tasks:
  - id: push_flows
    type: io.kestra.plugin.git.PushFlows
    sourceNamespace: dev
    targetNamespace: prod
    flows: "*"
    includeChildNamespaces: true
    gitDirectory: _flows
    url: https://github.com/kestra-io/scripts
    username: git_username
    password: "{{ secret('GITHUB_ACCESS_TOKEN') }}"
    branch: kestra
    commitMessage: "add flows {{ now() }}"
    dryRun: true 

  - id: push_namespace_files
    type: io.kestra.plugin.git.PushNamespaceFiles
    namespace: dev
    files: "*"
    gitDirectory: _files
    url: https://github.com/kestra-io/scripts
    username: git_username
    password: "{{ secret('GITHUB_ACCESS_TOKEN') }}"
    branch: dev
    commitMessage: "add namespace files {{ now() }}"
    dryRun: true

triggers:
  - id: every_full_hour
    type: io.kestra.plugin.core.trigger.Schedule
    cron: "*/15 * * * *"

Push Flows

Push Namespace Files

Schedule

More Related Blueprints

New to Kestra?

Use blueprints to kickstart your first workflows.

Get started with Kestra