PushExecutionFiles
Commit and push execution output files to a Git repository.
This task pushes one or more files produced by a task execution directly to Git.
type: "io.kestra.plugin.git.PushExecutionFiles"Examples
Push output files generated from task to Git
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
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
branch string
mainThe branch to which files should be committed and pushed
If the branch doesn’t exist yet, it will be created.
cloneSubmodules booleanstring
Whether to clone submodules
commitMessage string
Add files from execution {{ execution.id }}Git commit message
delete booleanstring
trueWhether to delete flows/files from Git that are no longer present in Kestra
If true (default), files present in Git but not in Kestra will be deleted from the Git repository.
dryRun booleanstring
falseIf true, the task will only output modifications without pushing any file to Git yet. If false (default), all listed files will be pushed to Git immediately.
errorOnMissing booleanstring
falsefiles Non-dynamicobject
Glob pattern(s) to select execution output files from the working directory
If provided, will match files relative to the execution working directory.
filesMap Non-dynamicobjectstring
A map of key-value pairs where the key is the filename and the value is the URI of the file to upload.
This should be a map of URIs, with the key being the filename that will be upload and the value is the URI.This property is intended to be used with the output files of other tasks. Many Kestra tasks, incl. all Downloads tasks, output a map of files so that you can directly pass the output property to this task e.g., outputFiles in the S3 Downloads task or the files in the Archive Decompress task.
gitConfig object
Git configuration to apply to the repository
Map of Git config keys and values, applied after clone few examples: - 'core.fileMode': false -> ignore file permission changes - 'core.autocrlf': false -> prevent line ending conversion
gitDirectory string
_outputsDirectory in the Git repository where files should be pushed
Defaults to _outputs.
passphrase string
The passphrase for the privateKey
password string
The password or Personal Access Token (PAT) – when you authenticate the task with a PAT, any flows or files pushed to Git from Kestra will be pushed from the user associated with that PAT. This way, you don't need to configure the commit author (the authorName and authorEmail properties).
privateKey string
PEM-format private key content that is paired with a public key registered on Git
To generate an ECDSA PEM format key from OpenSSH, use the following command: ssh-keygen -t ecdsa -b 256 -m PEM. You can then set this property with your private key content and put your public key on Git.
trustedCaPemPath string
Optional path to a PEM-encoded CA certificate to trust (in addition to the JVM default truststore)
Equivalent to git config http.sslCAInfo <path>. Use this for self-signed/internal CAs.
url string
The URI to clone from
username string
The username or organization