-
Notifications
You must be signed in to change notification settings - Fork 22
192 lines (187 loc) · 6.1 KB
/
baota-docker-test.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
name: Build baota-docker Image (test)
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Triggers the workflow on push or pull request events but only for the main branch
# push:
# branches: [ main ]
# push:
# tags:
# - "v*"
jobs:
Baota-docker_clear_image_Build:
name: Build baota-docker Image (clear)
runs-on: oracle-SanJose-arm-01
steps:
-
name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} # ${{ steps.get_version.outputs.VERSION }}
-
name: Private Actions Checkout
uses: actions/[email protected]
-
name: Docker Setup QEMU
uses: docker/[email protected]
-
name: Docker Setup Buildx
uses: docker/[email protected]
-
name: Docker Login
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
continue-on-error: true
-
name: Docker Aliyun Login
uses: docker/[email protected]
with:
registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.ALI_USERNAME }}
password: ${{ secrets.ALI_PASSWORD }}
continue-on-error: true
-
name: Build and push Docker images
uses: docker/[email protected]
with:
context: clear/
platforms: linux/amd64
file: clear/Dockerfile
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/baota-docker:clear
registry.cn-hangzhou.aliyuncs.com/${{ secrets.NAME_SPACE }}/baota-docker:clear
continue-on-error: true
Baota-docker_ln_image_Build:
name: Build baota-docker Image (ln)
runs-on: oracle-Toronto-arm-01
steps:
-
name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} # ${{ steps.get_version.outputs.VERSION }}
-
name: Private Actions Checkout
uses: actions/[email protected]
-
name: Docker Setup QEMU
uses: docker/[email protected]
-
name: Docker Setup Buildx
uses: docker/[email protected]
-
name: Docker Login
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
continue-on-error: true
-
name: Docker Aliyun Login
uses: docker/[email protected]
with:
registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.ALI_USERNAME }}
password: ${{ secrets.ALI_PASSWORD }}
continue-on-error: true
-
name: Build and push Docker images
uses: docker/[email protected]
with:
context: ln/
platforms: linux/amd64
file: ln/Dockerfile
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/baota-docker:ln
registry.cn-hangzhou.aliyuncs.com/${{ secrets.NAME_SPACE }}/baota-docker:ln
continue-on-error: true
Baota-docker_lnp_image_Build:
name: Build baota-docker Image (lnp)
runs-on: ubuntu-latest
steps:
-
name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} # ${{ steps.get_version.outputs.VERSION }}
-
name: Private Actions Checkout
uses: actions/[email protected]
-
name: Docker Setup QEMU
uses: docker/[email protected]
-
name: Docker Setup Buildx
uses: docker/[email protected]
-
name: Docker Login
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
continue-on-error: true
-
name: Docker Aliyun Login
uses: docker/[email protected]
with:
registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.ALI_USERNAME }}
password: ${{ secrets.ALI_PASSWORD }}
continue-on-error: true
-
name: Build and push Docker images
uses: docker/[email protected]
with:
context: lnp/
platforms: linux/amd64
file: lnp/Dockerfile
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/baota-docker:lnp
registry.cn-hangzhou.aliyuncs.com/${{ secrets.NAME_SPACE }}/baota-docker:lnp
continue-on-error: true
Baota-docker_lnmp_image_Build:
name: Build baota-docker Image (lnmp)
runs-on: ubuntu-latest
steps:
-
name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} # ${{ steps.get_version.outputs.VERSION }}
-
name: Private Actions Checkout
uses: actions/[email protected]
-
name: Docker Setup QEMU
uses: docker/[email protected]
-
name: Docker Setup Buildx
uses: docker/[email protected]
-
name: Docker Login
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
continue-on-error: true
-
name: Docker Aliyun Login
uses: docker/[email protected]
with:
registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.ALI_USERNAME }}
password: ${{ secrets.ALI_PASSWORD }}
continue-on-error: true
-
name: Build and push Docker images
uses: docker/[email protected]
with:
context: lnmp/
platforms: linux/amd64
file: lnmp/Dockerfile
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/baota-docker:lnmp
registry.cn-hangzhou.aliyuncs.com/${{ secrets.NAME_SPACE }}/baota-docker:lnmp
continue-on-error: true