-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
217d6ca
commit 88cea8f
Showing
1 changed file
with
23 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,36 @@ | ||
name: Deploy to Minikube using GitHub Actions | ||
|
||
on: [push] | ||
on: | ||
push: | ||
|
||
jobs: | ||
job1: | ||
runs-on: ubuntu-latest | ||
name: build Node.js Docker Image and deploy to minikube | ||
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: | | ||
- 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:" | ||
echo -n "Verifying images:" | ||
docker images | ||
- name: Deploy to minikube | ||
run: | ||
kubectl apply -f k8s-node-app.yaml | ||
- name: Test service URLs | ||
run: | | ||
- 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 | ||
keep-alive: | ||
runs-on: ubuntu-latest | ||
needs: job1 | ||
steps: | ||
- name: Keep Alive | ||
run: sleep infinity |