Git Push with YAML

YAML parameters for Git Push

Name Type Description
action Required String The ID of the action.
type Required String The type of the action. Should be set to PUSH.
targets Required Target[] Defines a target (Git repository) for your deployments using the following parameters.
tag String The name of the tag to push.
push_tags Boolean Defines whether the tags should be pushed to the remote repository or not.
use_custom_gitignore Boolean When set to false the push will ignore paths listed in .gitignore file.
isolated Boolean When set to true, action will push only repository files (without artifacts).
target_branch String Defines the remote branch to which the push will be performed. If empty, files will be pushed to the same branch.
deployment_excludes String[] The paths and/or files that will be left out during the push. Only works when use_custom_gitignore is set to true.
without_force Boolean Defines whether the --force flag should be used when invoking the git push command or not.
comment String Optional custom git commit message.
custom_options String Use custom git push options.

Parameters for targets

Name Type Description
repository Required String The url to the repository.
auth Required String The authentication mode for GIT. Available values: HTTP, SSH_KEY, ASSETS_KEY
username String The username required to connect to Git repository.
password String The password required to connect to Git repository.
key String The private SSH key.
asset String Name of the variable containing the private key.

YAML example for Git Push action:

yaml
actions: - action: Git Push type: PUSH push_tags: true target_branch: $BUDDY_RUN_BRANCH comment: $BUDDY_RUN_ID tag: example custom_options: --force deployment_excludes: - example_file_to_ignore targets: - example_git_push_target without_force: false use_custom_gitignore: true

YAML example for Git Push targets:

Password

yaml
- target: git_password type: GIT url: https://github.com/example/my-repository name: example_name auth: username: user password: example_password

SSH_KEY

yaml
- target: git_workspace type: GIT url: https://github.com/example/my-repository name: GIT WORKSPACE auth: method: SSH_KEY key: example_ssh_key

Asset

yaml
- target: git_workspace type: GIT url: https://github.com/example/my-repository name: GIT WORKSPACE auth: method: ASSETS_KEY asset: example_asset_name

Last modified on Jul 31, 2025