---
title: "Git push ile yayın (Gyro Pipeline)"
description: "Bir depo bağlayın: her push Dockerfile'ı derler ve servisi kesintisiz yeni sürüme geçirir."
url: https://www.gyrohosting.com/developers/tr/howto/container-pipeline.html
language: tr
openapi: https://www.gyrohosting.com/developers/openapi.json
api_version: 2.30.0
---

# Git push ile yayın (Gyro Pipeline)

Bir depo bağlayın: her push Dockerfile'ı derler ve servisi kesintisiz yeni sürüme geçirir.

**curl**

```bash
curl -s -X POST https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/pipelines \
  -H "Authorization: Bearer $GYRO_TOKEN" -H "Content-Type: application/json" \
  -d '{"name":"web","provider":"github","repo":"https://github.com/gyro-ornek/uygulama","branch":"main","auto":true,"image":"web","targets":["web"]}'
```

**CLI**

```bash
gyro container pipeline create 12345 --name web --provider github --repo https://github.com/gyro-ornek/uygulama --branch main --auto --image web --targets web
```

**Terraform**

```hcl
resource "gyro_container_pipeline" "web" {
  service_id = 12345
  name       = "web"
  repo       = "https://github.com/gyro-ornek/uygulama"
  branch     = "main"
  image      = "web"
  targets    = ["web"]
}
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
```

Yanıttaki `webhook_url` ve `webhook_secret` değerlerini deponun webhook ayarına ekleyin (GitHub: *application/json*, push olayı). Özel depo: salt okuma `token` gönderin ya da deploy key ile SSH adresi kullanın. Depo yoksa: `"provider":"archive"` ve arşiv yükleyin.


## Elle çalıştırın ve izleyin

**curl**

```bash
curl -s -X POST https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/pipelines/7/runs -H "Authorization: Bearer $GYRO_TOKEN" -H "Content-Type: application/json" -d '{}'
curl -s https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/pipeline-runs/42/logs -H "Authorization: Bearer $GYRO_TOKEN"
```

**CLI**

```bash
gyro container pipeline run 12345 7
gyro container pipeline run-get 12345 42
```

Çok aşamalı Dockerfile: `build_target` (`--target`). Yeni sürüm sağlıksızsa `auto_rollback` öncekine döner.
