@@ -123,8 +123,8 @@ jobs:
123
123
- name : Image digest
124
124
run : echo ${{ steps.docker_build.outputs.digest }}
125
125
126
- deploy_image :
127
- name : ' Publish: DockerHub'
126
+ deploy_image_debian :
127
+ name : ' Publish: Debian to DockerHub'
128
128
runs-on : ubuntu-latest
129
129
needs : [jest, tox]
130
130
if : github.event_name == 'release' || github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master'
@@ -169,5 +169,57 @@ jobs:
169
169
uses : docker/build-push-action@v2
170
170
with :
171
171
push : true
172
+ platforms : linux/amd64,linux/arm64
173
+ tags : ${{ steps.release_meta.outputs.tags || steps.edge_meta.outputs.tags }}
174
+ labels : ${{ steps.release_meta.outputs.labels || steps.edge_meta.outputs.tags }}
175
+
176
+ deploy_image_alpine :
177
+ name : ' Publish: Alpine to DockerHub'
178
+ runs-on : ubuntu-latest
179
+ needs : [jest, tox]
180
+ if : github.event_name == 'release' || github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master'
181
+ steps :
182
+ - name : Set up QEMU
183
+ uses : docker/setup-qemu-action@v1
184
+
185
+ - name : Set up Docker Buildx
186
+ uses : docker/setup-buildx-action@v1
187
+
188
+ - name : Extract branch name
189
+ shell : bash
190
+ run : echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
191
+ id : extract_branch
192
+
193
+ - name : Generating release tags and labels
194
+ if : github.event_name == 'release'
195
+ id : release_meta
196
+ uses : docker/metadata-action@v4
197
+ with :
198
+ images : jaedb/iris
199
+ tags : |
200
+ latest-alpine
201
+ type=semver,pattern={{version}}-alpine
202
+ type=semver,pattern={{major}}.{{minor}}-alpine
203
+
204
+ - name : Generating edge branch labels
205
+ if : github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master'
206
+ id : edge_meta
207
+ uses : docker/metadata-action@v4
208
+ with :
209
+ images : jaedb/iris
210
+ tags : ${{ steps.extract_branch.outputs.branch }}
211
+
212
+ - name : Login to DockerHub
213
+ uses : docker/login-action@v1
214
+ with :
215
+ username : ${{ secrets.DOCKERHUB_USERNAME }}
216
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
217
+
218
+ - name : Build and push
219
+ uses : docker/build-push-action@v2
220
+ with :
221
+ push : true
222
+ platforms : linux/amd64,linux/arm64
223
+ file : " {{context}}/Dockerfile.alpine"
172
224
tags : ${{ steps.release_meta.outputs.tags || steps.edge_meta.outputs.tags }}
173
225
labels : ${{ steps.release_meta.outputs.labels || steps.edge_meta.outputs.tags }}
0 commit comments