Second pass at reworking Docker CI. (#17111)
This time properly taking into account the honestly ridiculous limiations in Docker’s tooling.
Austin S. Hemmelgarn committed
Mar 6, 2024 at 08:54 UTC
6642af31f153c0a8ff615ea19556d73dd9e2538b
1 file changed
+294
-113
.github/workflows/docker.yml
+294
-113
@@ -1,4 +1,13 @@
1
---
2
+# Handle building docker images both for CI checks and for eleases.
3
+#
4
+# The case of releaases is unfortunately rather complicated, as Docker
5
+# tooling does not have great support for handling of multiarch images
6
+# published to multiple registries. As a result, we have to build the
7
+# images, export the cache, and then _rebuild_ the images using the exported
8
+# cache but with different output parameters for buildx. We also need to
9
+# do the second build step as a separate job for each registry so that a
10
+# failure to publish one place won’t break publishing elsewhere.
11
name: Docker
12
on:
13
push:
@@ -23,14 +32,19 @@ jobs:
32
outputs:
33
run: ${{ steps.check-run.outputs.run }}
34
steps:
35
+ - name: Skip File Check
36
+ if: github.event_name == 'workflow_dispatch'
37
+ run: echo 'run=true' >> "${GITHUB_OUTPUT}"
38
- name: Checkout
39
id: checkout
40
+ if: github.event_name != 'workflow_dispatch'
41
uses: actions/checkout@v4
42
with:
43
fetch-depth: 0
44
submodules: recursive
45
- name: Check files
46
id: check-files
47
+ if: github.event_name != 'workflow_dispatch'
48
uses: tj-actions/changed-files@v42
49
with:
50
since_last_remote_commit: ${{ github.event_name != 'pull_request' }}
@@ -65,6 +79,7 @@ jobs:
79
**/*.md
80
- name: List all changed files in pattern
81
continue-on-error: true
82
+ if: github.event_name != 'workflow_dispatch'
83
env:
84
ALL_CHANGED_FILES: ${{ steps.check-files.outputs.all_changed_files }}
85
run: |
@@ -73,6 +88,7 @@ jobs:
88
done
89
- name: Check Run
90
id: check-run
91
+ if: github.event_name != 'workflow_dispatch'
92
run: |
93
if [ "${{ steps.check-files.outputs.any_modified }}" == "true" ] || [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
94
echo 'run=true' >> "${GITHUB_OUTPUT}"
@@ -80,9 +96,102 @@ jobs:
96
echo 'run=false' >> "${GITHUB_OUTPUT}"
97
fi
98
99
+ build-images:
100
+ name: Build Docker Images
101
+ needs:
102
+ - file-check
103
+ runs-on: ubuntu-latest
104
+ strategy:
105
+ matrix:
106
+ platform:
107
+ - linux/amd64
108
+ - linux/i386
109
+ - linux/arm/v7
110
+ - linux/arm64
111
+ - linux/ppc64le
112
+ # Fail fast on releases, but run everything to completion on other triggers.
113
+ fail-fast: ${{ github.event_name == 'workflow_dispatch' }}
114
+ steps:
115
+ - name: Skip Check
116
+ id: skip
117
+ if: needs.file-check.outputs.run != 'true'
118
+ run: echo "SKIPPED"
119
+ - name: Checkout
120
+ id: checkout
121
+ if: needs.file-check.outputs.run == 'true'
122
+ uses: actions/checkout@v4
123
+ with:
124
+ fetch-depth: 0
125
+ submodules: recursive
126
+ - name: Generate Artifact Name
127
+ id: artifact-name
128
+ if: github.repository == 'netdata/netdata' && needs.file-check.outputs.run == 'true' && github.event_name == 'workflow_dispatch'
129
+ run: echo "platform=$(echo ${{ matrix.platform }} | tr '/' '-' | cut -f 2- -d '-')" >> "${GITHUB_OUTPUT}"
130
+ - name: Mark image as official
131
+ id: env
132
+ if: github.repository == 'netdata/netdata' && needs.file-check.outputs.run == 'true' && github.event_name == 'workflow_dispatch'
133
+ run: echo "OFFICIAL_IMAGE=true" >> "${GITHUB_ENV}"
134
+ - name: Setup QEMU
135
+ id: qemu
136
+ if: matrix.platform != 'linux/i386' && matrix.platform != 'linux/amd64' && needs.file-check.outputs.run == 'true'
137
+ uses: docker/setup-qemu-action@v3
138
+ - name: Setup Buildx
139
+ id: prepare
140
+ if: needs.file-check.outputs.run == 'true'
141
+ uses: docker/setup-buildx-action@v3
142
+ - name: Build Image
143
+ id: build
144
+ if: needs.file-check.outputs.run == 'true'
145
+ uses: docker/build-push-action@v5
146
+ with:
147
+ platforms: ${{ matrix.platform }}
148
+ tags: netdata/netdata:test
149
+ load: true
150
+ cache-to: type=local,dest=/tmp/build-cache,mode=max
151
+ build-args: OFFICIAL_IMAGE=${{ env.OFFICIAL_IMAGE }}
152
+ - name: Test Image
153
+ id: test
154
+ if: needs.file-check.outputs.run == 'true' && matrix.platform == 'linux/amd64'
155
+ run: .github/scripts/docker-test.sh
156
+ - name: Upload Cache
157
+ id: upload-cache
158
+ if: github.repository == 'netdata/netdata' && needs.file-check.outputs.run == 'true' && github.event_name == 'workflow_dispatch'
159
+ uses: actions/upload-artifact@v4
160
+ with:
161
+ name: cache-${{ steps.artifact-name.outputs.platform }}
162
+ path: /tmp/build-cache/*
163
+ retention-days: 1
164
+ - name: Failure Notification
165
+ uses: rtCamp/action-slack-notify@v2
166
+ env:
167
+ SLACK_COLOR: 'danger'
168
+ SLACK_FOOTER: ''
169
+ SLACK_ICON_EMOJI: ':github-actions:'
170
+ SLACK_TITLE: 'Docker build failed:'
171
+ SLACK_USERNAME: 'GitHub Actions'
172
+ SLACK_MESSAGE: |-
173
+ ${{ github.repository }}: Building or testing Docker image for ${{ matrix.platform }} failed.
174
+ Checkout: ${{ steps.checkout.outcome }}
175
+ Determine artifact name: ${{ steps.artifact-name.outcome }}
176
+ Setup environment: ${{ steps.env.outcome }}
177
+ Setup QEMU: ${{ steps.qemu.outcome }}
178
+ Setup buildx: ${{ steps.prepare.outcome }}
179
+ Build image: ${{ steps.build.outcome }}
180
+ Test image: ${{ steps.test.outcome }}
181
+ Upload build cache: ${{ steps.upload-cache.outcome }}
182
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
183
+ if: >-
184
+ ${{
185
+ failure()
186
+ && github.event_name != 'pull_request'
187
+ && github.repository == 'netdata/netdata'
188
+ && needs.file-check.outputs.run == 'true'
189
+ }}
190
+
191
gen-tags:
192
name: Generate Docker Tags
193
runs-on: ubuntu-latest
194
+ if: github.event_name == 'workflow_dispatch'
195
outputs:
196
tags: ${{ steps.tag.outputs.tags }}
197
steps:
@@ -98,12 +207,12 @@ jobs:
207
echo "tags=$(.github/scripts/gen-docker-tags.py ${{ github.event_name }} '')" >> "${GITHUB_OUTPUT}"
208
fi
209
101
- build-images:
102
- name: Build Docker Images
210
+ build-images-docker-hub:
211
+ name: Push Images to Docker Hub
212
+ if: github.event_name == 'workflow_dispatch'
213
needs:
104
- - file-check
214
+ - build-images
215
- gen-tags
106
- runs-on: ubuntu-latest
216
strategy:
217
matrix:
218
platform:
@@ -112,104 +221,62 @@ jobs:
221
- linux/arm/v7
222
- linux/arm64
223
- linux/ppc64le
115
- # Fail fast on releases so that we minimize the number of ‘dead’
116
- # images we push, but run everything to completion on other triggers.
117
- fail-fast: ${{ github.event_name == 'workflow_dispatch' }}
224
+ runs-on: ubuntu-latest
225
steps:
119
- - name: Skip Check
120
- id: skip
121
- if: needs.file-check.outputs.run != 'true'
122
- run: echo "SKIPPED"
226
- name: Checkout
227
id: checkout
125
- if: needs.file-check.outputs.run == 'true'
228
uses: actions/checkout@v4
229
with:
230
fetch-depth: 0
231
submodules: recursive
232
+ - name: Generate Artifact Name
233
+ id: artifact-name
234
+ run: echo "platform=$(echo ${{ matrix.platform }} | tr '/' '-' | cut -f 2- -d '-')" >> "${GITHUB_OUTPUT}"
235
+ - name: Download Cache
236
+ id: fetch-cache
237
+ uses: actions/download-artifact@v4
238
+ with:
239
+ name: cache-${{ steps.artifact-name.outputs.platform }}
240
+ path: /tmp/build-cache
241
- name: Mark image as official
242
id: env
132
- if: github.repository == 'netdata/netdata' && needs.file-check.outputs.run == 'true' && github.event_name == 'workflow_dispatch'
243
+ if: github.repository == 'netdata/netdata'
244
run: echo "OFFICIAL_IMAGE=true" >> "${GITHUB_ENV}"
134
- - name: Generate Build Output Config
135
- id: gen-config
136
- if: needs.file-check.outputs.run == 'true'
137
- run: echo "output-config=$(.github/scripts/gen-docker-build-output.py ${{ github.event_name }})" >> "${GITHUB_OUTPUT}"
245
- name: Setup QEMU
246
id: qemu
140
- if: matrix.platform != 'linux/i386' && matrix.platform != 'linux/amd64' && needs.file-check.outputs.run == 'true'
247
+ if: matrix.platform != 'linux/i386' && matrix.platform != 'linux/amd64'
248
uses: docker/setup-qemu-action@v3
249
- name: Setup Buildx
250
id: prepare
144
- if: needs.file-check.outputs.run == 'true'
251
uses: docker/setup-buildx-action@v3
146
- - name: Docker Hub Login
147
- id: docker-hub-login
148
- if: github.repository == 'netdata/netdata' && needs.file-check.outputs.run == 'true' && github.event_name == 'workflow_dispatch'
149
- continue-on-error: true
252
+ - name: Registry Login
253
+ id: login
254
+ if: github.repository == 'netdata/netdata'
255
uses: docker/login-action@v3
256
with:
257
username: ${{ secrets.DOCKER_HUB_USERNAME }}
258
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
154
-# - name: GitHub Container Registry Login
155
-# id: ghcr-login
156
-# if: github.repository == 'netdata/netdata' && needs.file-check.outputs.run == 'true' && github.event_name == 'workflow_dispatch'
157
-# continue-on-error: true
158
-# uses: docker/login-action@v3
159
-# with:
160
-# registry: ghcr.io
161
-# username: ${{ github.repository_owner }}
162
-# password: ${{ secrets.GITHUB_TOKEN }}
163
- - name: Quay.io Login
164
- id: quay-login
165
- if: github.repository == 'netdata/netdata' && needs.file-check.outputs.run == 'true' && github.event_name == 'workflow_dispatch'
166
- continue-on-error: true
167
- uses: docker/login-action@v3
168
- with:
169
- registry: quay.io
170
- username: ${{ secrets.NETDATABOT_QUAY_USERNAME }}
171
- password: ${{ secrets.NETDATABOT_QUAY_TOKEN }}
259
- name: Build Image
260
id: build
174
- if: needs.file-check.outputs.run == 'true'
261
uses: docker/build-push-action@v5
262
with:
263
platforms: ${{ matrix.platform }}
178
- tags: ${{ needs.gen-tags.outputs.tags }}
179
- load: true
264
+ cache-from: type=local,src=/tmp/build-cache
265
build-args: OFFICIAL_IMAGE=${{ env.OFFICIAL_IMAGE }}
181
- - name: Test Image
182
- id: test
183
- if: needs.file-check.outputs.run == 'true' && matrix.platform == 'linux/amd64'
184
- run: .github/scripts/docker-test.sh
185
- - name: Push to Docker Hub
186
- id: push-docker-hub
187
- if: github.repository == 'netdata/netdata' && needs.file-check.outputs.run == 'true' && github.event_name == 'workflow_dispatch' && steps.docker-hub-login.outcome == 'success'
188
- continue-on-error: true
189
- run: docker image push 'netdata/netdata@${{ steps.build.outputs.digest }}'
190
-# - name: Push to GitHub Container Registry
191
-# id: push-ghcr
192
-# if: github.repository == 'netdata/netdata' && needs.file-check.outputs.run == 'true' && github.event_name == 'workflow_dispatch' && steps.docker-hub-login.outcome == 'success'
193
-# continue-on-error: true
194
-# run: docker image push 'netdata/netdata@${{ steps.build.outputs.digest }}'
195
- - name: Push to Quay.io
196
- id: push-quay
197
- if: github.repository == 'netdata/netdata' && needs.file-check.outputs.run == 'true' && github.event_name == 'workflow_dispatch' && steps.docker-hub-login.outcome == 'success'
198
- continue-on-error: true
199
- run: docker image push 'quay.io/netdata/netdata@${{ steps.build.outputs.digest }}'
266
+ outputs: type=image,name=netdata/netdata,push-by-digest=true,name-canonical=true,push=true
267
- name: Export Digest
268
id: export-digest
202
- if: github.repository == 'netdata/netdata' && needs.file-check.outputs.run == 'true' && github.event_name == 'workflow_dispatch'
269
+ if: github.repository == 'netdata/netdata'
270
run: |
271
mkdir -p /tmp/digests
272
digest="${{ steps.build.outputs.digest }}"
273
touch "/tmp/digests/${digest#sha256:}"
274
- name: Upload digest
275
id: upload-digest
209
- if: github.repository == 'netdata/netdata' && needs.file-check.outputs.run == 'true' && github.event_name == 'workflow_dispatch'
276
+ if: github.repository == 'netdata/netdata'
277
uses: actions/upload-artifact@v4
278
with:
212
- name: digests-${{ env.PLATFORM_PAIR }}
279
+ name: docker-digests-${{ steps.artifact-name.outputs.platform }}
280
path: /tmp/digests/*
281
if-no-files-found: error
282
retention-days: 1
@@ -219,37 +286,32 @@ jobs:
286
SLACK_COLOR: 'danger'
287
SLACK_FOOTER: ''
288
SLACK_ICON_EMOJI: ':github-actions:'
222
- SLACK_TITLE: 'Docker build failed:'
289
+ SLACK_TITLE: 'Docker Hub upload failed:'
290
SLACK_USERNAME: 'GitHub Actions'
291
SLACK_MESSAGE: |-
225
- ${{ github.repository }}: Building or testing Docker image for ${{ matrix.platform }} failed.
292
+ ${{ github.repository }}: Creating or uploading Docker image for ${{ matrix.platform }} on Docker Hub failed.
293
Checkout: ${{ steps.checkout.outcome }}
294
+ Determine artifact name: ${{ steps.artifact-name.outcome }}
295
+ Fetch build cache: ${{ steps.fetch-cache.outcome }}
296
Setup environment: ${{ steps.env.outcome }}
228
- Generate Build Output Config: ${{ steps.gen-config.outcome }}
297
Setup QEMU: ${{ steps.qemu.outcome }}
298
Setup buildx: ${{ steps.prepare.outcome }}
231
- Login to DockerHub: ${{ steps.docker-hub-login.outcome }}
232
- Login to Quay: ${{ steps.quay-login.outcome }}
299
+ Login to registry: ${{ steps.login.outcome }}
300
Build image: ${{ steps.build.outcome }}
234
- Test image: ${{ steps.test.outcome }}
235
- Push to Docker Hub: ${{ steps.push-docker-hub.outcome }}
236
- Push to Quay: ${{ steps.push-quay.outcome }}
301
Export digest: ${{ steps.export-digest.outcome }}
302
Upload digest: ${{ steps.upload-digest.outcome }}
303
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
304
if: >-
305
${{
306
failure()
243
- && github.event_name != 'pull_request'
307
&& github.repository == 'netdata/netdata'
245
- && needs.file-check.outputs.run == 'true'
308
}}
309
248
- publish:
249
- name: Consolidate and tag images
310
+ publish-docker-hub:
311
+ name: Consolidate and tag images for DockerHub
312
if: github.event_name == 'workflow_dispatch'
313
needs:
252
- - build-images
314
+ - build-images-docker-hub
315
- gen-tags
316
runs-on: ubuntu-latest
317
steps:
@@ -258,69 +320,188 @@ jobs:
320
uses: actions/download-artifact@v4
321
with:
322
path: /tmp/digests
261
- pattern: digests-*
323
+ pattern: docker-digests-*
324
merge-multiple: true
325
- name: Setup Buildx
326
id: prepare
327
uses: docker/setup-buildx-action@v3
266
- - name: Docker Hub Login
267
- id: docker-hub-login
328
+ - name: Registry Login
329
+ id: login
330
if: github.repository == 'netdata/netdata'
269
- continue-on-error: true
331
uses: docker/login-action@v3
332
with:
333
username: ${{ secrets.DOCKER_HUB_USERNAME }}
334
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
274
- - name: GitHub Container Registry Login
275
- id: ghcr-login
335
+ - name: Create and Push Manifest
336
+ id: manifest
337
+ if: github.repository == 'netdata/netdata'
338
+ run: docker buildx imagetool create $(.github/scripts/gen-docker-imagetool-args.py /tmp/digests '' ${{ needs.gen-tags.outputs.tags }})
339
+ - name: Failure Notification
340
+ uses: rtCamp/action-slack-notify@v2
341
+ env:
342
+ SLACK_COLOR: 'danger'
343
+ SLACK_FOOTER: ''
344
+ SLACK_ICON_EMOJI: ':github-actions:'
345
+ SLACK_TITLE: 'Publishing Docker images to Docker Hub failed:'
346
+ SLACK_USERNAME: 'GitHub Actions'
347
+ SLACK_MESSAGE: |-
348
+ ${{ github.repository }}: Publishing Docker images to Docker Hub failed.
349
+ Download digests: ${{ steps.fetch-digests.outcome }}
350
+ Setup buildx: ${{ steps.prepare.outcome }}
351
+ Login to registry: ${{ steps.login.outcome }}
352
+ Create and push manifest: ${{ steps.manifest.outcome }}
353
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
354
+ if: >-
355
+ ${{
356
+ failure()
357
+ && github.repository == 'netdata/netdata'
358
+ }}
359
+
360
+ build-images-quay:
361
+ name: Push Images to Quay.io
362
+ if: github.event_name == 'workflow_dispatch'
363
+ needs:
364
+ - build-images
365
+ - gen-tags
366
+ strategy:
367
+ matrix:
368
+ platform:
369
+ - linux/amd64
370
+ - linux/i386
371
+ - linux/arm/v7
372
+ - linux/arm64
373
+ - linux/ppc64le
374
+ runs-on: ubuntu-latest
375
+ steps:
376
+ - name: Checkout
377
+ id: checkout
378
+ uses: actions/checkout@v4
379
+ with:
380
+ fetch-depth: 0
381
+ submodules: recursive
382
+ - name: Generate Artifact Name
383
+ id: artifact-name
384
+ run: echo "platform=$(echo ${{ matrix.platform }} | tr '/' '-' | cut -f 2- -d '-')" >> "${GITHUB_OUTPUT}"
385
+ - name: Download Cache
386
+ id: fetch-cache
387
+ uses: actions/download-artifact@v4
388
+ with:
389
+ name: cache-${{ steps.artifact-name.outputs.platform }}
390
+ path: /tmp/build-cache
391
+ - name: Mark image as official
392
+ id: env
393
+ if: github.repository == 'netdata/netdata'
394
+ run: echo "OFFICIAL_IMAGE=true" >> "${GITHUB_ENV}"
395
+ - name: Setup QEMU
396
+ id: qemu
397
+ if: matrix.platform != 'linux/i386' && matrix.platform != 'linux/amd64'
398
+ uses: docker/setup-qemu-action@v3
399
+ - name: Setup Buildx
400
+ id: prepare
401
+ uses: docker/setup-buildx-action@v3
402
+ - name: Registry Login
403
+ id: login
404
if: github.repository == 'netdata/netdata'
277
- continue-on-error: true
405
uses: docker/login-action@v3
406
with:
280
- registry: ghcr.io
281
- username: ${{ github.repository_owner }}
282
- password: ${{ secrets.GITHUB_TOKEN }}
283
- - name: Quay.io Login
284
- id: quay-login
407
+ registry: quay.io
408
+ username: ${{ secrets.NETDATABOT_QUAY_USERNAME }}
409
+ password: ${{ secrets.NETDATABOT_QUAY_TOKEN }}
410
+ - name: Build Image
411
+ id: build
412
+ uses: docker/build-push-action@v5
413
+ with:
414
+ platforms: ${{ matrix.platform }}
415
+ cache-from: type=local,src=/tmp/build-cache
416
+ build-args: OFFICIAL_IMAGE=${{ env.OFFICIAL_IMAGE }}
417
+ outputs: type=image,name=netdata/netdata,push-by-digest=true,name-canonical=true,push=true
418
+ - name: Export Digest
419
+ id: export-digest
420
+ if: github.repository == 'netdata/netdata'
421
+ run: |
422
+ mkdir -p /tmp/digests
423
+ digest="${{ steps.build.outputs.digest }}"
424
+ touch "/tmp/digests/${digest#sha256:}"
425
+ - name: Upload digest
426
+ id: upload-digest
427
+ if: github.repository == 'netdata/netdata'
428
+ uses: actions/upload-artifact@v4
429
+ with:
430
+ name: quay-digests-${{ steps.artifact-name.outputs.platform }}
431
+ path: /tmp/digests/*
432
+ if-no-files-found: error
433
+ retention-days: 1
434
+ - name: Failure Notification
435
+ uses: rtCamp/action-slack-notify@v2
436
+ env:
437
+ SLACK_COLOR: 'danger'
438
+ SLACK_FOOTER: ''
439
+ SLACK_ICON_EMOJI: ':github-actions:'
440
+ SLACK_TITLE: 'Quay.io upload failed:'
441
+ SLACK_USERNAME: 'GitHub Actions'
442
+ SLACK_MESSAGE: |-
443
+ ${{ github.repository }}: Creating or uploading Docker image for ${{ matrix.platform }} on Quay.io failed.
444
+ Checkout: ${{ steps.checkout.outcome }}
445
+ Determine artifact name: ${{ steps.artifact-name.outcome }}
446
+ Fetch build cache: ${{ steps.fetch-cache.outcome }}
447
+ Setup environment: ${{ steps.env.outcome }}
448
+ Setup QEMU: ${{ steps.qemu.outcome }}
449
+ Setup buildx: ${{ steps.prepare.outcome }}
450
+ Login to registry: ${{ steps.login.outcome }}
451
+ Build image: ${{ steps.build.outcome }}
452
+ Export digest: ${{ steps.export-digest.outcome }}
453
+ Upload digest: ${{ steps.upload-digest.outcome }}
454
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
455
+ if: >-
456
+ ${{
457
+ failure()
458
+ && github.repository == 'netdata/netdata'
459
+ }}
460
+
461
+ publish-quay:
462
+ name: Consolidate and tag images for Quay.io
463
+ if: github.event_name == 'workflow_dispatch'
464
+ needs:
465
+ - build-images-quay
466
+ - gen-tags
467
+ runs-on: ubuntu-latest
468
+ steps:
469
+ - name: Download digests
470
+ id: fetch-digests
471
+ uses: actions/download-artifact@v4
472
+ with:
473
+ path: /tmp/digests
474
+ pattern: quay-digests-*
475
+ merge-multiple: true
476
+ - name: Setup Buildx
477
+ id: prepare
478
+ uses: docker/setup-buildx-action@v3
479
+ - name: Registry Login
480
+ id: login
481
if: github.repository == 'netdata/netdata'
286
- continue-on-error: true
482
uses: docker/login-action@v3
483
with:
484
registry: quay.io
485
username: ${{ secrets.NETDATABOT_QUAY_USERNAME }}
486
password: ${{ secrets.NETDATABOT_QUAY_TOKEN }}
292
- - name: Create and Push Manifest for Docker Hub
293
- id: docker-hub-push
294
- if: github.repository == 'netdata/netdata' && steps.docker-hub-login.outcome == 'success'
295
- continue-on-error: true
487
+ - name: Create and Push Manifest
488
+ id: manifest
489
+ if: github.repository == 'netdata/netdata'
490
run: docker buildx imagetool create $(.github/scripts/gen-docker-imagetool-args.py /tmp/digests '' ${{ needs.gen-tags.outputs.tags }})
297
-# - name: Create and Push Manifest for GitHub Container Registry
298
-# id: ghcr-push
299
-# if: github.repository == 'netdata/netdata' && steps.ghcr-login.outcome == 'success'
300
-# continue-on-error: true
301
-# run: docker buildx imagetool create $(.github/scripts/gen-docker-imagetool-args.py /tmp/digests 'ghcr.io' ${{ needs.gen-tags.outputs.tags }})
302
- - name: Create and Push Manifest for Quay.io
303
- id: quay-push
304
- if: github.repository == 'netdata/netdata' && steps.quay-login.outcome == 'success'
305
- continue-on-error: true
306
- run: docker buildx imagetool create $(.github/scripts/gen-docker-imagetool-args.py /tmp/digests 'quay.io' ${{ needs.gen-tags.outputs.tags }})
491
- name: Failure Notification
492
uses: rtCamp/action-slack-notify@v2
493
env:
494
SLACK_COLOR: 'danger'
495
SLACK_FOOTER: ''
496
SLACK_ICON_EMOJI: ':github-actions:'
313
- SLACK_TITLE: 'Publishing Docker images failed:'
497
+ SLACK_TITLE: 'Publishing Docker images on Quay.io failed:'
498
SLACK_USERNAME: 'GitHub Actions'
499
SLACK_MESSAGE: |-
316
- ${{ github.repository }}: Publishing Docker images failed.
500
+ ${{ github.repository }}: Publishing Docker images on Quay.io failed.
501
Download digests: ${{ steps.fetch-digests.outcome }}
502
Setup buildx: ${{ steps.prepare.outcome }}
319
- Login to DockerHub: ${{ steps.docker-hub-login.outcome }}
320
- Login to GHCR: ${{ steps.ghcr-login.outcome }}
321
- Login to Quay: ${{ steps.quay-login.outcome }}
322
- Publish DockerHub: ${{ steps.docker-hub-push.outcome }}
323
- Publish Quay: ${{ steps.quay-push.outcome }}
503
+ Login to registry: ${{ steps.login.outcome }}
504
+ Create and push manifest: ${{ steps.manifest.outcome }}
505
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
506
if: >-
507
${{