syncnamespacefilessyncnamespacefiles
syncnamespacefilesCertified

yaml
type: "io.kestra.plugin.git.syncnamespacefiles"
yaml
id: sync_from_git
namespace: system

tasks:
  - id: git
    type: io.kestra.plugin.git.SyncNamespaceFiles
    namespace: prod
    gitDirectory: _files
    delete: true
    url: https://github.com/kestra-io/flows
    branch: main
    username: git_username
    password: "{{ secret('GITHUB_ACCESS_TOKEN') }}"
    dryRun: true

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

yaml
id: git_sync
namespace: system

tasks:
  - id: sync
    type: io.kestra.plugin.core.flow.ForEach
    values: ["company", "company.team", "company.analytics"]
    tasks:
      - id: flows
        type: io.kestra.plugin.git.SyncFlows
        targetNamespace: "{{ taskrun.value }}"
        gitDirectory: "{{'flows/' ~ taskrun.value}}"
        includeChildNamespaces: false

      - id: scripts
        type: io.kestra.plugin.git.SyncNamespaceFiles
        namespace: "{{ taskrun.value }}"
        gitDirectory: "{{'scripts/' ~ taskrun.value}}"

pluginDefaults:
  - type: io.kestra.plugin.git
    values:
      username: anna-geller
      url: https://github.com/anna-geller/product
      password: "{{ secret('GITHUB_ACCESS_TOKEN') }}"
      branch: main
      dryRun: false

triggers:
  - id: every_full_hour
    type: io.kestra.plugin.core.trigger.Schedule
    cron: "0 * * * *"
Properties
Defaultmain
Default10000
Defaultfalse
Defaultfalse
Defaulttrue
Default_files
Default{{ flow.namespace }}
Default60000