Skip to content

updates minikube installation #8

updates minikube installation

updates minikube installation #8

Workflow file for this run

name: CI/CD Workflow
on:
push:
branches:
- main
- development
jobs:
build_and_push_image:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Docker meta
uses: docker/metadata-action@v4
id: meta
with:
images: |
afzal442/wisecow-app
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
deploy_to_kubernetes:
needs: build_and_push_image
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Install kubectl
run: |
sudo apt-get update
sudo apt-get install -y kubectl
- name: Install Minikube
run: |
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
- name: Start Minikube
run: minikube start
- name: Deploy to Minikube
run: kubectl apply -f kube_manifests/