File tree Expand file tree Collapse file tree 3 files changed +83
-8
lines changed Expand file tree Collapse file tree 3 files changed +83
-8
lines changed Original file line number Diff line number Diff line change
1
+ name : Build xenon
2
+
3
+ on :
4
+ workflow_call :
5
+ inputs :
6
+ image_tag :
7
+ required : true
8
+ type : string
9
+ secrets :
10
+ DOCKERHUB_USERNAME :
11
+ description : ' username of dockerhub'
12
+ required : true
13
+ DOCKERHUB_TOKEN :
14
+ description : ' password of dockerhub'
15
+ required : true
16
+
17
+ jobs :
18
+ build :
19
+ runs-on : ubuntu-latest
20
+ steps :
21
+ - name : Set up QEMU
22
+ uses : docker/setup-qemu-action@v1
23
+
24
+ - name : Set up Docker Buildx
25
+ uses : docker/setup-buildx-action@v1
26
+
27
+ - name : Login to DockerHub
28
+ uses : docker/login-action@v1
29
+ with :
30
+ username : ${{ secrets.DOCKERHUB_USERNAME }}
31
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
32
+
33
+ - name : Build and push
34
+ id : docker_build
35
+ uses : docker/build-push-action@v2
36
+ with :
37
+ push : true
38
+ file : build/xenon/Dockerfile
39
+ tags : radondb/xenon:${{ inputs.image_tag }}
Original file line number Diff line number Diff line change 1
1
name : Code check
2
2
3
3
on :
4
+ workflow_dispatch :
4
5
push :
5
6
branches : [ main ]
6
7
paths-ignore :
20
21
21
22
jobs :
22
23
23
- gofmt :
24
+ fmtvet :
24
25
runs-on : ubuntu-latest
25
26
steps :
26
27
- name : Set up Go
@@ -31,10 +32,15 @@ jobs:
31
32
- name : Check out source code
32
33
uses : actions/checkout@v1
33
34
34
- - name : Run go fmt
35
- run : d="$(gofmt -d ../../)" && if [ -n "$d" ]; then echo "format error:" ; echo "$d"; exit 1; fi
35
+ - name : Run go fmt/vet
36
+ run : |
37
+ make fmt
38
+ make vet
36
39
37
- check-crd :
40
+ - name : Check
41
+ run : d="$(git status -s)" && if [ -n "$d" ]; then echo "check-crd error:" ; echo "$d"; exit 1; fi
42
+
43
+ checkcrd :
38
44
runs-on : ubuntu-latest
39
45
steps :
40
46
- name : Set up Go
@@ -46,10 +52,12 @@ jobs:
46
52
uses : actions/checkout@v1
47
53
48
54
- name : Recreate crd
49
- run : make manifests
55
+ run : |
56
+ make manifests
57
+ make generate
50
58
51
59
- name : Check crd
52
- run : diff charts/mysql-operator/crds config/ crd/bases
60
+ run : d="$(git status -s)" && if [ -n "$d" ]; then echo "check- crd error:" ; echo "$d"; exit 1; fi
53
61
54
62
staticcheck :
55
63
runs-on : ubuntu-latest
67
75
68
76
- name : Run staticcheck
69
77
run : staticcheck -f stylish ./...
78
+
79
+ build :
80
+ runs-on : ubuntu-latest
81
+ steps :
82
+ - name : Set up Go
83
+ uses : actions/setup-go@v2
84
+ with :
85
+ go-version : 1.16
86
+
87
+ - name : Check out source code
88
+ uses : actions/checkout@v1
89
+
90
+ - name : Make build
91
+ run : make build
Original file line number Diff line number Diff line change 17
17
required : true
18
18
default : true
19
19
type : boolean
20
+ build_xenon :
21
+ description : " "
22
+ required : true
23
+ default : true
24
+ type : boolean
20
25
21
26
jobs :
22
27
build_operator :
23
28
uses : radondb/radondb-mysql-kubernetes/.github/workflows/build_operator_image.yml@main
24
- if : ${{ github.event.inputs.build_operator }}
29
+ if : ${{ github.event.inputs.build_operator == 'true' }}
25
30
with :
26
31
image_tag : ${{ github.event.inputs.tag }}
27
32
secrets :
30
35
31
36
build_sidecar :
32
37
uses : radondb/radondb-mysql-kubernetes/.github/workflows/build_sidecar_image.yml@main
33
- if : ${{ github.event.inputs.build_sidecar }}
38
+ if : ${{ github.event.inputs.build_sidecar == 'true' }}
39
+ with :
40
+ image_tag : ${{ github.event.inputs.tag }}
41
+ secrets :
42
+ DOCKERHUB_USERNAME : ${{ secrets.DOCKERHUB_USERNAME }}
43
+ DOCKERHUB_TOKEN : ${{ secrets.DOCKERHUB_TOKEN }}
44
+
45
+ build_xenon :
46
+ uses : radondb/radondb-mysql-kubernetes/.github/workflows/build_xenon_image.yml@main
47
+ if : ${{ github.event.inputs.build_xenon == 'true' }}
34
48
with :
35
49
image_tag : ${{ github.event.inputs.tag }}
36
50
secrets :
You can’t perform that action at this time.
0 commit comments