diff --git a/.gitea/workflows/build-and-deploy.yml b/.gitea/workflows/build-and-deploy.yml index 1a44524..eb8ed23 100644 --- a/.gitea/workflows/build-and-deploy.yml +++ b/.gitea/workflows/build-and-deploy.yml @@ -8,25 +8,23 @@ on: jobs: build: runs-on: ubuntu-latest - + steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up Buildx - uses: docker/setup-buildx-action@v2 - - - name: Build and Push - uses: docker/build-push-action@v4 - with: - context: . - push: true - tags: | - localhost:5000/cloudforge-dashboard-backend:${{ github.sha }} - localhost:5000/cloudforge-dashboard-backend:latest - - - name: Deploy - run: | - helm upgrade --install cloudforge ./helm \ - --set backend.image.tag=${{ github.sha }} \ - -n cloudforge + - name: Checkout test + 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