File tree Expand file tree Collapse file tree 4 files changed +66
-3
lines changed Expand file tree Collapse file tree 4 files changed +66
-3
lines changed Original file line number Diff line number Diff line change
1
+ name : Build
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ inputs :
6
+ tag :
7
+ description : " Image Tag"
8
+ default : " latest"
9
+ push :
10
+ branches :
11
+ - ' main'
12
+ - ' release-*'
13
+ tags :
14
+ - ' v*'
15
+
16
+ jobs :
17
+ buildx :
18
+ runs-on : ubuntu-latest
19
+ steps :
20
+ - name : Checkout
21
+ uses : actions/checkout@v2
22
+
23
+ - name : Prepare
24
+ id : prepare
25
+ run : |
26
+ VERSION=latest
27
+ if [[ $GITHUB_REF == refs/tags/* ]]; then
28
+ VERSION=${GITHUB_REF#refs/tags/}
29
+ fi
30
+ if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
31
+ VERSION=${{ github.event.inputs.tag }}
32
+ fi
33
+ echo ::set-output name=version::${VERSION}
34
+
35
+ - name : Docker meta for kubesphere
36
+ id : meta
37
+ uses : docker/metadata-action@v3
38
+ with :
39
+ images : docker.io/kubesphere/volume-initializer
40
+ tags : ${{ steps.prepare.outputs.version }}
41
+
42
+ - name : Set up QEMU
43
+ uses : docker/setup-qemu-action@v1
44
+ - name : Set up Docker Buildx
45
+ uses : docker/setup-buildx-action@v1
46
+ - name : Login to DockerHub
47
+ if : github.event_name != 'pull_request'
48
+ uses : docker/login-action@v1
49
+ with :
50
+ registry : docker.io
51
+ username : ${{ secrets.DOCKERHUB_USERNAME }}
52
+ password : ${{ secrets.DOCKERHUB_PASSWORD }}
53
+
54
+ - name : Build and push Docker images
55
+
56
+ with :
57
+ context : .
58
+ file : ./Dockerfile
59
+ tags : ${{ steps.meta.outputs.tags }}
60
+ push : true
61
+ load : false
62
+ labels : ${{ steps.meta.outputs.labels }}
63
+ platforms : linux/amd64,linux/arm64
Original file line number Diff line number Diff line change 17
17
spec :
18
18
containers :
19
19
- name : container-tle280
20
- image : ' registry.cn-hangzhou.aliyuncs.com/stoneshiyunify /mongodb:4.2.4-debian-10-r0'
20
+ image : ' bitnami /mongodb:4.2.4-debian-10-r0'
21
21
ports :
22
22
- name : http-27017
23
23
containerPort : 27017
Original file line number Diff line number Diff line change 90
90
spec :
91
91
containers :
92
92
- name : volume-initializer
93
- image : registry.cn-hangzhou.aliyuncs.com/stoneshiyunify /volume-initializer:latest
93
+ image : kubesphere /volume-initializer:latest
94
94
imagePullPolicy : Always
95
95
args : ['--tls-cert-file=/etc/run/certs/tls.crt', '--tls-private-key-file=/etc/run/certs/tls.key']
96
96
ports :
Original file line number Diff line number Diff line change 90
90
spec :
91
91
containers :
92
92
- name : volume-initializer
93
- image : registry.cn-hangzhou.aliyuncs.com/stoneshiyunify /volume-initializer:latest
93
+ image : kubesphere /volume-initializer:latest
94
94
imagePullPolicy : Always
95
95
args : ['--tls-cert-file=/etc/run/certs/tls.crt', '--tls-private-key-file=/etc/run/certs/tls.key']
96
96
ports :
You can’t perform that action at this time.
0 commit comments