ci: add workflow for build and deploy
This commit is contained in:
@@ -13,7 +13,7 @@ jobs:
|
|||||||
|
|
||||||
# ── JOB 1: Build i Push Docker image ──────────────────
|
# ── JOB 1: Build i Push Docker image ──────────────────
|
||||||
build:
|
build:
|
||||||
runs-on: self-hosted
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout koda
|
- name: Checkout koda
|
||||||
@@ -40,8 +40,8 @@ jobs:
|
|||||||
path: tag.txt
|
path: tag.txt
|
||||||
# ── JOB 2: Deploy na k3s ───────────────────────────────
|
# ── JOB 2: Deploy na k3s ───────────────────────────────
|
||||||
deploy:
|
deploy:
|
||||||
needs: buil
|
needs: build
|
||||||
runs-on: self-hosted
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout koda
|
- name: Checkout koda
|
||||||
@@ -68,3 +68,4 @@ jobs:
|
|||||||
kubectl apply -f k8s/
|
kubectl apply -f k8s/
|
||||||
kubectl rollout status deployment/hello-cicd \
|
kubectl rollout status deployment/hello-cicd \
|
||||||
-n student-${{ github.actor }} --timeout=120s
|
-n student-${{ github.actor }} --timeout=120s
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user