File tree Expand file tree Collapse file tree 2 files changed +37
-9
lines changed Expand file tree Collapse file tree 2 files changed +37
-9
lines changed Original file line number Diff line number Diff line change 68
68
- name : Test kind works and there is no cluster started
69
69
run : |
70
70
[[ $(kind get clusters | wc -l) -eq 0 ]]
71
+
72
+ test-with-macos-install-only :
73
+ runs-on : macos-latest
74
+ steps :
75
+ - name : Checkout
76
+ uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
77
+
78
+ - name : Only install kind without starting a cluster
79
+ uses : ./
80
+ with :
81
+ install_only : true
82
+
83
+ - name : Test kind works and there is no cluster started
84
+ run : |
85
+ [[ $(kind get clusters | wc -l) -eq 0 ]]
71
86
72
87
test-with-custom-kubectl-version :
73
88
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -56,14 +56,27 @@ main() {
56
56
exit 1
57
57
fi
58
58
59
- local arch
60
- case $( uname -m) in
61
- i386) arch=" 386" ;;
62
- i686) arch=" 386" ;;
63
- x86_64) arch=" amd64" ;;
64
- arm|aarch64|arm64) arch=" arm64" ;;
59
+ local os=" linux"
60
+ case $( uname) in
61
+ Darwin) os=" darwin" ;;
65
62
esac
66
- local cache_dir=" ${RUNNER_TOOL_CACHE} /kind/${version} /${arch} "
63
+
64
+ local arch
65
+ if [[ " $os " == " darwin" ]]; then
66
+ case $( uname -m) in
67
+ x86_64) arch=" amd64" ;;
68
+ arm|arm64) arch=" arm64" ;;
69
+ esac
70
+ else
71
+ case $( uname -m) in
72
+ i386) arch=" 386" ;;
73
+ i686) arch=" 386" ;;
74
+ x86_64) arch=" amd64" ;;
75
+ arm|aarch64|arm64) arch=" arm64" ;;
76
+ esac
77
+ fi
78
+
79
+ local cache_dir=" ${RUNNER_TOOL_CACHE} /kind/${version} /${os} /${arch} "
67
80
68
81
local kind_dir=" ${cache_dir} /kind/bin/"
69
82
if [[ ! -x " ${kind_dir} /kind" ]]; then
@@ -188,7 +201,7 @@ install_kind() {
188
201
189
202
mkdir -p " ${kind_dir} "
190
203
191
- curl -sSLo " ${kind_dir} /kind" " https://github.com/kubernetes-sigs/kind/releases/download/${version} /kind-linux -${arch} "
204
+ curl -sSLo " ${kind_dir} /kind" " https://github.com/kubernetes-sigs/kind/releases/download/${version} /kind-${os} -${arch} "
192
205
chmod +x " ${kind_dir} /kind"
193
206
}
194
207
@@ -197,7 +210,7 @@ install_kubectl() {
197
210
198
211
mkdir -p " ${kubectl_dir} "
199
212
200
- curl -sSLo " ${kubectl_dir} /kubectl" " https://storage.googleapis.com/kubernetes-release/release/${kubectl_version} /bin/linux /${arch} /kubectl"
213
+ curl -sSLo " ${kubectl_dir} /kubectl" " https://storage.googleapis.com/kubernetes-release/release/${kubectl_version} /bin/${os} /${arch} /kubectl"
201
214
chmod +x " ${kubectl_dir} /kubectl"
202
215
}
203
216
You can’t perform that action at this time.
0 commit comments