Add CI/CD workflow
Some checks failed
Build and Deploy / build (push) Failing after 1m12s

This commit is contained in:
2025-11-19 14:33:54 +08:00
parent 0dbdf6660f
commit b9c1175571

View File

@@ -0,0 +1,30 @@
name: Build and Deploy
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build Docker Image
run: |
docker build -t cloudforge-dashboard-backend:latest .
docker tag cloudforge-dashboard-backend:latest cloudforge-dashboard-backend:${{ github.sha }}
- name: Deploy to K3S
run: |
helm upgrade --install cloudforge ./cloudforge-dashboard-helm \
--set backend.image.tag=${{ github.sha }} \
-n cloudforge \
--create-namespace
- name: Verify Deployment
run: |
kubectl rollout status deployment/dashboard-backend -n cloudforge