-
Notifications
You must be signed in to change notification settings - Fork 4
66 lines (65 loc) · 1.87 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
on:
schedule:
- cron: '0 0 * * *'
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test-workflow:
strategy:
matrix:
kubebuilder-version:
- 2.3.2
- 3.9.1
kubebuilder-only:
- true
- false
etcd-version:
-
- v3.4.24
kubernetes-version:
-
- v1.26.2
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Test the workflow
uses: ./
with:
version: ${{ matrix.kubebuilder-version }}
kubebuilderOnly: ${{ matrix.kubebuilder-only }}
etcdVersion: ${{ matrix.etcd-version }}
kubernetesVersion: ${{ matrix.kubernetes-version }}
- name: Check the existence of kubebuilder
env:
KUBEBUILDER_ONLY: ${{ matrix.kubebuilder-only }}
run: |-
cd /usr/local/kubebuilder/bin
if [ -f "./kubebuilder" ] && [ "$KUBEBUILDER_ONLY" == "true" ]; then
if [ ! -f "./kubectl" ] && [ ! -f "./kube-apiserver" ] && [ ! -f "./etcd" ]; then
echo "Only kubebuilder have been installed!"
echo "Checking if the binaries are executable"
./kubebuilder version
exit 0
else
echo "There are extra binaries installed"
ls -la ./
exit 1
fi
fi
if [ -f "./kubectl" ] && [ -f "./kube-apiserver" ] && [ -f "./etcd" ] && [ -f "./kubebuilder" ]; then
echo "All binaries from kubebuilder have been installed!"
echo "Checking if the binaries are executable"
./kubebuilder version
./kubectl version --client true
./kube-apiserver --version
./etcd --version
else
echo "Cannot find the binaries from kubuilder!"
ls -la ./
exit 1
fi