Files
dogu/.gitea/workflows/deploy.yaml
gitmuhammedalbayrak 58096753f9
Some checks failed
Harita Build ve Deploy / build-and-deploy (push) Failing after 3m12s
Docker Context ile TCP baglantisi duzeltildi
2025-11-20 01:33:20 +03:00

58 lines
1.8 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: Harita Build ve Deploy
run-name: ${{ gitea.actor }} haritayi guncelliyor 🚀
on: [push]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
# Ortam değişkenini buraya sabitliyoruz
env:
DOCKER_HOST: tcp://localhost:2375
DOCKER_TLS_CERTDIR: ""
steps:
- name: Kodu Çek (Checkout)
uses: actions/checkout@v3
# --- İŞTE ÇÖZÜM BURASI ---
# Buildx action'ı TCP adresini anlamazsa, ona elle öğretiyoruz.
- name: Docker Context Oluştur
run: |
docker context create my-context --docker "host=tcp://localhost:2375"
docker context use my-context
- name: Docker Buildx Kurulumu
uses: docker/setup-buildx-action@v3 # Versiyonu v3 yaptık
with:
endpoint: my-context # Oluşturduğumuz context'i kullan diyoruz
- name: Docker Login (Gitea Registry)
uses: docker/login-action@v3 # Versiyonu v3 yaptık
with:
registry: git.konstantiniyye.studio
username: gitea_admin
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Docker Build ve Push
uses: docker/build-push-action@v5 # Versiyonu v5 yaptık
with:
context: .
push: true
tags: git.konstantiniyye.studio/gitea_admin/dogu:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Kubernetes'e Deploy Et (Rancher)
uses: actions-hub/kubectl@master
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
with:
args: apply -f deployment.yaml
- name: Deployment'ı Yenile (Restart Pod)
uses: actions-hub/kubectl@master
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
with:
args: rollout restart deployment/dogu-haritasi