Skip to content

Delete github/workspace directory #3

Delete github/workspace directory

Delete github/workspace directory #3

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches: [ main ]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ghcr.io/${{ github.repository }}:latest
- name: Setup Kubectl
uses: azure/setup-kubectl@v3
with:
version: 'v1.29.0'
- name: Setup Kubeconfig
run: |
mkdir -p $HOME/.kube
echo "${{ secrets.KUBECONFIG_CONTENT }}" > $HOME/.kube/config
- name: Deploy to Minikube (or Cluster)
run: |
kubectl apply -f k8s/deployment.yaml
kubectl apply -f k8s/service.yaml