name: CI/CD Pipeline on: push: branches: - main jobs: build-and-push: runs-on:…
- User
name: CI/CD Pipeline
on: push: branches: - main
jobs: build-and-push: runs-on: ubuntu-latest
codesteps: - name: Checkout uses: actions/checkout@v4 - name: Setup Node.js environment uses: actions/setup-node@v4 with: node-version: '20.x' cache: 'pnpm' - name: Install dependencies run: pnpm install - name: Build project run: pnpm build - name: Login to Docker Hub uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push Docker image uses: docker/build-push-action@v6 with: context: . push: true tags: test/backend:latest - name: Deploy to Kubernetes cluster uses: azure/k8s-deploy@v5 with: namespace: backend-api manifests: | ./deployment.yaml ./service.yaml ./ingress.yaml images: | test/backend:latest kubectl-version: 'latest' kubeconfig: ${{ secrets.KUBE_CONFIG }}I need you to check if this Ci/CD is pipeline for github actions is correct and I need you to check if my Deploy to Kubernetes cluster is going to work. My cluster is on Hetzner and I'm using microk8s.
- Assistant