Skip to content

feat: Initialize the project #6

feat: Initialize the project

feat: Initialize the project #6

name: Deploy to Minikube using GitHub Actions
on:
push:
jobs:
job1:
runs-on: ubuntu-latest
name: Build Node.js Docker Image and deploy to Minikube
steps:
- uses: actions/checkout@v2
- name: Start Minikube
uses: medyagh/setup-minikube@master
- name: Try the cluster!
run: kubectl get pods -A
- name: Build image
run: |
export SHELL=/bin/bash
eval $(minikube -p minikube docker-env)
docker build -f ./Dockerfile -t devopshint/node-app:latest .
echo -n "Verifying images:"
docker images
- name: Deploy to Minikube
run:
kubectl apply -f k8s-node-app.yaml
- name: Test service URLs
run: |
minikube service list
minikube service nodejs-app --url
echo "------------------opening the service------------------"
minikube ip
curl $(minikube service nodejs-app --url)