Skip to content

Commit 220c100

Browse files
committed
feat(minikube): configure minikube in github actions
Signed-off-by: Ashutosh Kumar <sonasingh46@gmail.com>
1 parent 0f9a916 commit 220c100

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

.github/workflows/main.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,41 @@ jobs:
3636
- name: Enforce Go Formatting
3737
run: |
3838
! go fmt ./... 2>&1 | read
39+
40+
# This workflow contains a single job called "build"
41+
bdd:
42+
# The type of runner that the job will run on
43+
runs-on: ubuntu-latest
44+
45+
# Steps represent a sequence of tasks that will be executed as part of the job
46+
steps:
47+
48+
- name: Set up Go 1.13
49+
uses: actions/setup-go@v1
50+
with:
51+
go-version: 1.13
52+
id: go
53+
54+
- name: Check out code into the Go module directory
55+
uses: actions/checkout@v1
56+
with:
57+
fetch-depth: 1
58+
path: go/src/github.com/sonasingh46/github-actions
59+
60+
# Check for go formatting
61+
- name: Configure Minikube
62+
run: |
63+
chmod +x hack/minikube.sh
64+
./hack/minikube.sh
65+
66+
- name: Configure Kubectl
67+
run: |
68+
sudo mv /home/runner/.kube /home/runner/.minikube $HOME
69+
sudo chown -R $USER $HOME/.kube $HOME/.minikube
70+
echo "Get kubectl client and server version"
71+
kubectl version
72+
echo "Get the node"
73+
kubectl get node
74+
75+
76+

hack/minikube.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env bash
2+
echo "Downloading Kubectl Binary..."
3+
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
4+
sudo chmod +x ./kubectl
5+
sudo mv ./kubectl /usr/local/bin/kubectl
6+
echo "Kubectl Client Version..."
7+
kubectl version --client
8+
9+
echo "Downloading Minikube Binary..."
10+
curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \
11+
&& chmod +x minikube
12+
13+
sudo mkdir -p /usr/local/bin/
14+
sudo install minikube /usr/local/bin/
15+
16+
echo "Minikube Version..."
17+
18+
minikube version
19+
20+
sudo minikube start --vm-driver=none --kubernetes-version=v1.16.0

0 commit comments

Comments
 (0)