48 lines
1.5 KiB
YAML
48 lines
1.5 KiB
YAML
name: Harita Build ve Deploy
|
||
run-name: ${{ gitea.actor }} haritayi guncelliyor 🚀
|
||
on: [push]
|
||
|
||
jobs:
|
||
build-and-deploy:
|
||
runs-on: ubuntu-latest # Senin kurduğun Act Runner burada devreye girecek
|
||
# --- BU KISMI EKLE (BAŞLANGIÇ) ---
|
||
# İşçiye Docker'ın nerede olduğunu söylüyoruz
|
||
container:
|
||
image: catthehacker/ubuntu:act-latest
|
||
env:
|
||
DOCKER_HOST: tcp://localhost:2375
|
||
DOCKER_TLS_CERTDIR: ""
|
||
# --- BU KISMI EKLE (BİTİŞ) ---
|
||
steps:
|
||
- name: Kodu Çek (Checkout)
|
||
uses: actions/checkout@v3
|
||
|
||
- name: Docker Login (Gitea Registry)
|
||
uses: docker/login-action@v2
|
||
with:
|
||
registry: git.konstantiniyye.studio
|
||
# Garanti olsun diye kullanıcı adını da elle yazalım:
|
||
username: gitea_admin
|
||
# Yeni oluşturduğumuz secret'ı kullanıyoruz:
|
||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||
|
||
- name: Docker Build ve Push
|
||
uses: docker/build-push-action@v4
|
||
with:
|
||
context: .
|
||
push: true
|
||
tags: git.konstantiniyye.studio/${{ gitea.actor }}/dogu-haritasi:latest
|
||
|
||
- 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 |