This commit is contained in:
30
.gitea/workflows/build-and-deploy.yml
Normal file
30
.gitea/workflows/build-and-deploy.yml
Normal 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
|
||||||
Reference in New Issue
Block a user