Git Push

  • POST
  • /workspaces
  • /:workspace
  • /projects
  • /:project_name
  • /pipelines
  • /:pipeline_id
  • /actions

Request

URL PARAMETERS
workspacerequired string
The workspace name.
pipeline_idrequired integer
The numerical ID of the desired pipeline.
project_namerequired string
The name ID of the project.
POST PARAMETERS
actionrequired string
The ID of the action.
typerequired string
The type of the action. Should be set to PUSH.
targetsrequired target[]
Defines a target (Git repository) for your deployments using the following parameters.
tagstring
The name of the tag to push.
push_tagsboolean
Defines whether the tags should be pushed to the remote repository or not.
use_custom_gitignoreboolean
When set to false the push will ignore paths listed in .gitignore file.
target_branchstring
Defines the remote branch to which the push will be performed. If empty, files will be pushed to the same branch.
deployment_excludesstring[]
The paths and/or files that will be left out during the push. Only works when use_custom_gitignore is set to true.
without_forcestring
Defines whether the --force flag should be used when invoking the git push command or not.
commentstring
Optional custom git commit message.
custom_optionsstring
Use custom git push options.

Last modified on May 13, 2025

Example:

curl -X POST "https://api.buddy.works/workspaces/:workspace/projects/:project_name/pipelines/:pipeline_id/actions" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
  "name": "Push to GitHub repo",
  "disabled": true,
  "type": "PUSH",
  "trigger_time": "ON_EVERY_EXECUTION",
  "trigger_conditions": [
    {
      "trigger_condition": "ON_CHAGE"
    },
    {
      "trigger_condition": "HOUR",
      "trigger_hours": [
        8,
        9,
        10
      ],
      "timezone": "Europe/Warsaw"
    }
  ],
  "deployment_excludes": [
    "/assets/",
    "/myDir"
  ],
  "targets": [
    {
      "identifier": "git-push",
      "name": "my-git-target",
      "type": "GIT",
      "auth": {
        "username": "user",
        "password": "pass1234",
        "method": "HTTP"
      },
      "repository": "https://github.com/example/my-repository"
    }
  ],
  "target_branch": "BUDDY_EXECUTION_BRANCH",
  "tag": "tagName",
  "custom_options": "--no-verify",
  "comment": "BUDDY_EXECUTION_ID",
  "isolated": false,
  "push_tags": true,
  "use_custom_gitignore": true,
  "without_force": false,
  "timeout": 1800,
  "retry_interval": 60,
  "retry_count": 5,
  "ignore_errors": true,
  "current_revision": "21825f31ddce8a89b3ed9f4c92f038b339cde150"
}'
EXAMPLE RESPONSE
{ "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/115020/actions/62954", "html_url": "ttps://app.sd3.com/buddy/company-website/pipelines/pipeline/115020/action/62954/edit", "id": 62954, "name": "Push to Github repo", "type": "PUSH", "trigger_time": "ON_EVERY_EXECUTION", "last_execution_status": "INITIAL", "current_revision": "21825f31ddce8a89b3ed9f4c92f038b339cde150", "disabled": true, "push_tags": true, "target_branch": "BUDDY_EXECUTION_BRANCH", "comment": "BUDDY_EXECUTION_ID", "tag": "tagName", "custom_options": "--no-verify", "deployment_excludes": [ "/assets/", "myDir" ], "targets": [ { "id": "tg-brqpc89jom2ue", "identifier": "git-push", "name": "my-git-target", "repository": "https://github.com/example/my-repository", "auth": { "method": "HTTP", "username": "user", "password": "!encrypted IhgphupofO3NgyeVaY8y/g==.lDtgG1ryBVPKlFVoIXnQ5A==" }, "type": "GIT" } ], "pipeline": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/115020", "html_url": "https://app.sd3.com/buddy/company-website/pipelines/pipeline/115020", "id": 115020, "identifier": "git-pipeline", "name": "my-git-push-pipeline", "definition_source": "LOCAL", "git_config_ref": "NONE", "refs": [ "refs/heads/master" ], "priority": "NORMAL", "disabled": false, "last_execution_status": "INITIAL", "always_from_scratch": false, "ignore_fail_on_project_status": false, "no_skip_to_most_recent": false, "terminate_stale_runs": false, "auto_clear_cache": false, "fetch_all_refs": false, "fail_on_prepare_env_warning": true, "concurrent_pipeline_runs": false, "do_not_create_commit_status": false, "stale": false, "waiting_for_push": false, "resources": "SMALL", "git_changeset_base": "LATEST_RUN", "filesystem_changeset_base": "DATE_MODIFIED", "cpu": "X64", "description_required": false }, "isolated": false, "without_force": false, "use_custom_gitignore": true, "ignore_errors": true, "retry_interval": 60, "retry_count": 5, "run_next": "WAIT_ON_SUCCESS", "trigger_conditions": [ { "trigger_condition": "ON_CHANGE" }, { "trigger_condition": "HOUR", "timezone": "Europe/Warsaw", "trigger_hours": [ 8, 9, 10 ] } ], "timeout": 1800 }
STATUS
200 OK
LIMITS
X-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999