Git PushExecutionFiles

Git PushExecutionFiles

Certified

Push execution files to Git

Stages execution output files from the working directory or storage and pushes them to Git under gitDirectory (default _outputs). Branch is created if missing; use dryRun to only generate the diff.

yaml
type: io.kestra.plugin.git.PushExecutionFiles

Push output files generated from task to Git

yaml
id: push_exec_files
namespace: company.team

tasks:
  - id: generate
    type: io.kestra.plugin.scripts.python.Script
    taskRunner:
      type: io.kestra.plugin.core.runner.Process
    outputFiles:
      - report.txt
    script: |
      with open("report.txt", "w") as f:
          f.write("Analysis done")

  - id: push
    type: io.kestra.plugin.git.PushExecutionFiles
    files:
      - "*.txt"
    gitDirectory: analytics
    url: https://github.com/company/data-pipeline
    username: git_user
    password: "{{ secret('GITHUB_TOKEN') }}"
    branch: data-reports
    commitMessage: "Add CSV and JSON reports {{ now() }}"

Push and rename execution outputs using filesMap

yaml
id: push_with_map
namespace: company.logs

tasks:
  - id: generate
    type: io.kestra.plugin.scripts.shell.Script
    outputFiles:
      - "run.log"
    script: |
      echo "Run completed at $(date)" > run.log

  - id: push
    type: io.kestra.plugin.git.PushExecutionFiles
    filesMap:
      "run-{{ execution.id }}.log": "{{ outputs.generate.outputFiles['run.log'] }}"
    gitDirectory: logs
    url: https://github.com/company/log-archive
    username: git_user
    password: "{{ secret('GITHUB_TOKEN') }}"
    branch: logs
    commitMessage: "Archive log for run {{ execution.id }}"
Properties

Commit author email

If null, no author is set.

Commit author name

Defaults to username when empty.

Defaultmain

Branch to push files

Defaults to main; created if absent.

Clone submodules

Default false; enable to fetch and initialize nested submodules.

DefaultAdd files from execution {{ execution.id }}

Git commit message

Default10000

HTTP connect timeout (ms)

Default 10000 ms.

Defaulttrue

Delete removed resources

If true (default), removes Git files that no longer exist in Kestra.

Defaultfalse

Dry run only

When true, writes a diff file without pushing. Default false pushes immediately.

Defaultfalse

Fail when no files are found

If true, raises an error when nothing matches files or filesMap; default false logs a warning and skips.

Glob pattern(s) for execution files

Matches files relative to the execution working directory.

Explicit file map

Map of destination filename to source file URI (string or JSON map). Useful for wiring outputFiles from other tasks.

Git configuration overrides

Map of git config keys and values applied after clone, e.g.:

  • core.fileMode: false (ignore permission flips)
  • core.autocrlf: false (preserve line endings)
Default_outputs

Destination directory

Relative path inside the repository; defaults to _outputs.

Disable proxy for HTTP

When true, forces direct connections instead of using the JVM proxy settings.

Passphrase for privateKey

Password or personal access token

Supplies HTTP credentials. When a PAT is used, pushes are recorded under that PAT’s user without needing authorName and authorEmail.

**GitHub PAT permissions required: **

  • Fine-grained PAT: Contents: Read (clone/fetch) or Contents: Read and Write (push), plus Metadata: Read (mandatory base permission). Add Workflows: Read and Write when pushing .github/workflows/ files.
  • Classic PAT: repo scope covers all read/write operations; add workflow when pushing workflow files.

Reference (ref) of the pluginDefaults to apply to this task.

PEM private key

PEM-formatted private key matching a public key registered on the Git server. Generate with ssh-keygen -t ecdsa -b 256 -m PEM.

Default60000

HTTP read timeout (ms)

Default 60000 ms.

Extra trusted CA PEM path

Optional PEM-encoded CA bundle added to the JVM truststore; equivalent to git config http.sslCAInfo <path> for self-signed or internal CAs.

Repository URL

HTTP(S) or SSH URI used for clone and push operations.

Username or organization

Used for HTTP basic authentication and as a fallback commit author.