fix: koristenje v3 akcija i ispravan deploy
This commit is contained in:
@@ -9,12 +9,11 @@ env:
|
|||||||
IMAGE: git.fpmoz.sum.ba/${{ github.repository }}
|
IMAGE: git.fpmoz.sum.ba/${{ github.repository }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# ── JOB 1: Build ──────────────────────────────────────
|
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout koda
|
- name: Checkout koda
|
||||||
uses: actions/checkout@v3 # Vraćeno na v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Login u Gitea registry
|
- name: Login u Gitea registry
|
||||||
run: |
|
run: |
|
||||||
@@ -31,21 +30,20 @@ jobs:
|
|||||||
echo $TAG > tag.txt
|
echo $TAG > tag.txt
|
||||||
|
|
||||||
- name: Spremi image tag
|
- name: Spremi image tag
|
||||||
uses: actions/upload-artifact@v3 # OVO JE BITNO: v3 umjesto v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: image-tag
|
name: image-tag
|
||||||
path: tag.txt
|
path: tag.txt
|
||||||
|
|
||||||
# ── JOB 2: Deploy ─────────────────────────────────────
|
|
||||||
deploy:
|
deploy:
|
||||||
needs: build
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout koda
|
- name: Checkout koda
|
||||||
uses: actions/checkout@v3 # Vraćeno na v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Preuzmi image tag
|
- name: Preuzmi image tag
|
||||||
uses: actions/download-artifact@v3 # OVO JE BITNO: v3 umjesto v4
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: image-tag
|
name: image-tag
|
||||||
|
|
||||||
@@ -67,9 +65,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Deploy na k3s
|
- name: Deploy na k3s
|
||||||
run: |
|
run: |
|
||||||
# Koristimo eksplicitnu putanju i gasimo validaciju
|
|
||||||
kubectl --kubeconfig=$HOME/.kube/config apply -f k8s/ --validate=false
|
kubectl --kubeconfig=$HOME/.kube/config apply -f k8s/ --validate=false
|
||||||
|
kubectl --kubeconfig=$HOME/.kube/config rollout status deployment/hello-cicd -n student-sz11zs --timeout=120s
|
||||||
# Provjera statusa za tvoj namespace sz11zs
|
|
||||||
kubectl --kubeconfig=$HOME/.kube/config rollout status deployment/hello-cicd \
|
|
||||||
-n student-sz11zs --timeout=120s
|
|
||||||
Reference in New Issue
Block a user