54
54
if [[ "${{ github.ref_name }}" =~ ^refs/heads/ ]]; then
55
55
git config user.name "github-actions[bot]"
56
56
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
57
-
57
+
58
58
git add dist/
59
59
git commit -m "chore(build): update dist"
60
60
git push
@@ -253,26 +253,46 @@ jobs:
253
253
with :
254
254
name : dist
255
255
256
+ - name : Define Platform Suffix
257
+ id : platform
258
+ run : |
259
+ if [[ "${{ matrix.platform }}" == "linux/amd64" ]]; then
260
+ echo "suffix=amd64" >> $GITHUB_OUTPUT
261
+ else
262
+ echo "suffix=arm64" >> $GITHUB_OUTPUT
263
+ fi
264
+
256
265
- name : Login to Docker Hub
257
266
uses : docker/login-action@v3
258
- if : ${{ github.event_name != 'pull_request' }}
267
+ if : ${{ github.event_name != 'pull_request' || contains(github.event.head_commit.message, '[push docker]') }}
259
268
with :
260
269
username : aminya
261
270
password : ${{ secrets.DOCKERHUB_TOKEN }}
262
271
263
272
- name : Build setup-cpp-${{matrix.container.distro }}
273
+ id : build_base
264
274
uses : docker/build-push-action@v6
265
275
with :
266
276
context : .
267
277
file : ./dev/docker/ci/${{ matrix.container.distro }}.dockerfile
268
- push : ${{ github.event_name != 'pull_request' }}
278
+ push : ${{ github.event_name != 'pull_request' || contains(github.event.head_commit.message, '[push docker]') }}
279
+ load : true
280
+ provenance : false
269
281
platforms : ${{ matrix.platform }}
270
- tags : aminya/${{ matrix.container.image }}:${{ matrix.container.tag }},aminya/ ${{ matrix.container.image }}:latest
282
+ tags : aminya/${{ matrix.container.image }}:${{ matrix.container.tag }}- ${{ steps.platform.outputs.suffix }}
271
283
cache-from : type=registry,ref=aminya/${{ matrix.container.image }}:latest
272
284
cache-to : type=inline
273
285
286
+ - name : Tag latest locally
287
+ run : |
288
+ docker tag aminya/${{ matrix.container.image }}:${{ matrix.container.tag }}-${{ steps.platform.outputs.suffix }} aminya/${{ matrix.container.image }}:latest
289
+
290
+ - name : Push latest to Docker Hub
291
+ if : ${{ github.event_name != 'pull_request' && matrix.container.distro != 'ubuntu' }}
292
+ run : docker push aminya/${{ matrix.container.image }}:latest
293
+
274
294
- name : Docker Readme for setup-cpp-${{matrix.container.distro }}
275
- if : ${{ github.event_name != 'pull_request' }}
295
+ if : ${{ github.event_name != 'pull_request' || contains(github.event.head_commit.message, '[push docker]') }}
276
296
uses : peter-evans/dockerhub-description@v4
277
297
with :
278
298
username : aminya
@@ -281,18 +301,29 @@ jobs:
281
301
readme-filepath : ./README_DOCKER.md
282
302
283
303
- name : Build setup-cpp-${{matrix.container.distro }}-llvm
304
+ id : build_llvm
284
305
uses : docker/build-push-action@v6
285
306
with :
286
307
context : .
287
308
file : ./dev/docker/ci/${{ matrix.container.distro }}-llvm.dockerfile
288
- push : ${{ github.event_name != 'pull_request' }}
309
+ push : ${{ github.event_name != 'pull_request' || contains(github.event.head_commit.message, '[push docker]') }}
310
+ load : true
311
+ provenance : false
289
312
platforms : ${{ matrix.platform }}
290
- tags : aminya/${{ matrix.container.image }}-llvm:${{ matrix.container.tag }},aminya/ ${{ matrix.container.image }}-llvm:latest
313
+ tags : aminya/${{ matrix.container.image }}-llvm:${{ matrix.container.tag }}- ${{ steps.platform.outputs.suffix }}
291
314
cache-from : type=registry,ref=aminya/${{ matrix.container.image }}-llvm:latest
292
315
cache-to : type=inline
293
316
317
+ - name : Tag latest locally
318
+ run : |
319
+ docker tag aminya/${{ matrix.container.image }}-llvm:${{ matrix.container.tag }}-${{ steps.platform.outputs.suffix }} aminya/${{ matrix.container.image }}-llvm:latest
320
+
321
+ - name : Push latest to Docker Hub
322
+ if : ${{ github.event_name != 'pull_request' && matrix.container.distro != 'ubuntu' }}
323
+ run : docker push aminya/${{ matrix.container.image }}-llvm:latest
324
+
294
325
- name : Docker Readme for setup-cpp-${{matrix.container.distro }}-llvm
295
- if : ${{ github.event_name != 'pull_request' }}
326
+ if : ${{ github.event_name != 'pull_request' || contains(github.event.head_commit.message, '[push docker]') }}
296
327
uses : peter-evans/dockerhub-description@v4
297
328
with :
298
329
username : aminya
@@ -311,18 +342,29 @@ jobs:
311
342
tags : aminya/test-${{ matrix.container.image }}-llvm:${{ matrix.container.tag }}
312
343
313
344
- name : Build setup-cpp-${{matrix.container.distro }}-gcc
345
+ id : build_gcc
314
346
uses : docker/build-push-action@v6
315
347
with :
316
348
context : .
317
349
file : ./dev/docker/ci/${{ matrix.container.distro }}-gcc.dockerfile
318
- push : ${{ github.event_name != 'pull_request' }}
350
+ push : ${{ github.event_name != 'pull_request' || contains(github.event.head_commit.message, '[push docker]') }}
351
+ load : true
352
+ provenance : false
319
353
platforms : ${{ matrix.platform }}
320
- tags : aminya/${{ matrix.container.image }}-gcc:${{ matrix.container.tag }},aminya/ ${{ matrix.container.image }}-gcc:latest
354
+ tags : aminya/${{ matrix.container.image }}-gcc:${{ matrix.container.tag }}- ${{ steps.platform.outputs.suffix }}
321
355
cache-from : type=registry,ref=aminya/${{ matrix.container.image }}-gcc:latest
322
356
cache-to : type=inline
323
357
358
+ - name : Tag latest locally
359
+ run : |
360
+ docker tag aminya/${{ matrix.container.image }}-gcc:${{ matrix.container.tag }}-${{ steps.platform.outputs.suffix }} aminya/${{ matrix.container.image }}-gcc:latest
361
+
362
+ - name : Push latest to Docker Hub
363
+ if : ${{ github.event_name != 'pull_request' && matrix.container.distro != 'ubuntu' }}
364
+ run : docker push aminya/${{ matrix.container.image }}-gcc:latest
365
+
324
366
- name : Docker Readme for setup-cpp-${{matrix.container.distro }}-gcc
325
- if : ${{ github.event_name != 'pull_request' }}
367
+ if : ${{ github.event_name != 'pull_request' || contains(github.event.head_commit.message, '[push docker]') }}
326
368
uses : peter-evans/dockerhub-description@v4
327
369
with :
328
370
username : aminya
@@ -341,17 +383,29 @@ jobs:
341
383
tags : aminya/test-${{ matrix.container.image }}-gcc:${{ matrix.container.tag }}
342
384
343
385
- name : Build setup-cpp-${{matrix.container.distro }}-mingw
344
- if : ${{ !contains(matrix.container.distro, 'fedora') }}
386
+ id : build_mingw
387
+ if : ${{ matrix.container.distro != 'fedora' }}
345
388
uses : docker/build-push-action@v6
346
389
with :
347
390
context : .
348
391
file : ./dev/docker/ci/${{ matrix.container.distro }}-mingw.dockerfile
349
- push : ${{ github.event_name != 'pull_request' }}
392
+ push : ${{ github.event_name != 'pull_request' || contains(github.event.head_commit.message, '[push docker]') }}
393
+ load : true
394
+ provenance : false
350
395
platforms : ${{ matrix.platform }}
351
- tags : aminya/${{ matrix.container.image }}-mingw:${{ matrix.container.tag }},aminya/ ${{ matrix.container.image }}-mingw:latest
396
+ tags : aminya/${{ matrix.container.image }}-mingw:${{ matrix.container.tag }}- ${{ steps.platform.outputs.suffix }}
352
397
cache-from : type=registry,ref=aminya/${{ matrix.container.image }}-mingw:latest
353
398
cache-to : type=inline
354
399
400
+ - name : Tag latest locally
401
+ if : ${{ matrix.container.distro != 'fedora' }}
402
+ run : |
403
+ docker tag aminya/${{ matrix.container.image }}-mingw:${{ matrix.container.tag }}-${{ steps.platform.outputs.suffix }} aminya/${{ matrix.container.image }}-mingw:latest
404
+
405
+ - name : Push latest to Docker Hub
406
+ if : ${{ github.event_name != 'pull_request' && matrix.container.distro != 'ubuntu' && matrix.container.distro != 'fedora' }}
407
+ run : docker push aminya/${{ matrix.container.image }}-mingw:latest
408
+
355
409
- name : Docker Readme for setup-cpp-${{matrix.container.distro }}-mingw
356
410
if : ${{ github.event_name != 'pull_request' && matrix.container.distro != 'fedora' }}
357
411
uses : peter-evans/dockerhub-description@v4
@@ -362,7 +416,7 @@ jobs:
362
416
readme-filepath : ./README_DOCKER.md
363
417
364
418
- name : Test Mingw
365
- if : ${{ !contains(github.event.head_commit.message, '[skip test]') && !contains( matrix.container.distro, 'fedora') }}
419
+ if : ${{ !contains(github.event.head_commit.message, '[skip test]') && matrix.container.distro != 'fedora' }}
366
420
uses : docker/build-push-action@v6
367
421
with :
368
422
context : .
@@ -371,6 +425,72 @@ jobs:
371
425
platforms : ${{ matrix.platform }}
372
426
tags : aminya/test-${{ matrix.container.image }}-mingw:${{ matrix.container.tag }}
373
427
428
+ Docker-Manifest :
429
+ needs : [Docker]
430
+ runs-on : ubuntu-24.04
431
+ if : ${{ github.event_name != 'pull_request' || contains(github.event.head_commit.message, '[push docker]') }}
432
+ steps :
433
+ - name : Set up Docker Buildx
434
+ uses : docker/setup-buildx-action@v3
435
+
436
+ - name : Login to Docker Hub
437
+ uses : docker/login-action@v3
438
+ with :
439
+ username : aminya
440
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
441
+
442
+ - uses : Noelware/docker-manifest-action@0.4.3
443
+ with :
444
+ inputs : aminya/setup-cpp-ubuntu:22.04-1.1.1
445
+ images : aminya/setup-cpp-ubuntu:22.04-1.1.1-amd64,aminya/setup-cpp-ubuntu:22.04-1.1.1-arm64
446
+ push : true
447
+ amend : true
448
+ - uses : Noelware/docker-manifest-action@0.4.3
449
+ with :
450
+ inputs : aminya/setup-cpp-ubuntu:latest
451
+ images : aminya/setup-cpp-ubuntu:22.04-1.1.1-amd64,aminya/setup-cpp-ubuntu:22.04-1.1.1-arm64
452
+ push : true
453
+ amend : true
454
+
455
+ - uses : Noelware/docker-manifest-action@0.4.3
456
+ with :
457
+ inputs : aminya/setup-cpp-ubuntu-llvm:22.04-1.1.1
458
+ images : aminya/setup-cpp-ubuntu-llvm:22.04-1.1.1-amd64,aminya/setup-cpp-ubuntu-llvm:22.04-1.1.1-arm64
459
+ push : true
460
+ amend : true
461
+ - uses : Noelware/docker-manifest-action@0.4.3
462
+ with :
463
+ inputs : aminya/setup-cpp-ubuntu-llvm:latest
464
+ images : aminya/setup-cpp-ubuntu-llvm:22.04-1.1.1-amd64,aminya/setup-cpp-ubuntu-llvm:22.04-1.1.1-arm64
465
+ push : true
466
+ amend : true
467
+
468
+ - uses : Noelware/docker-manifest-action@0.4.3
469
+ with :
470
+ inputs : aminya/setup-cpp-ubuntu-gcc:22.04-1.1.1
471
+ images : aminya/setup-cpp-ubuntu-gcc:22.04-1.1.1-amd64,aminya/setup-cpp-ubuntu-gcc:22.04-1.1.1-arm64
472
+ push : true
473
+ amend : true
474
+ - uses : Noelware/docker-manifest-action@0.4.3
475
+ with :
476
+ inputs : aminya/setup-cpp-ubuntu-gcc:latest
477
+ images : aminya/setup-cpp-ubuntu-gcc:22.04-1.1.1-amd64,aminya/setup-cpp-ubuntu-gcc:22.04-1.1.1-arm64
478
+ push : true
479
+ amend : true
480
+
481
+ - uses : Noelware/docker-manifest-action@0.4.3
482
+ with :
483
+ inputs : aminya/setup-cpp-ubuntu-mingw:22.04-1.1.1
484
+ images : aminya/setup-cpp-ubuntu-mingw:22.04-1.1.1-amd64,aminya/setup-cpp-ubuntu-mingw:22.04-1.1.1-arm64
485
+ push : true
486
+ amend : true
487
+ - uses : Noelware/docker-manifest-action@0.4.3
488
+ with :
489
+ inputs : aminya/setup-cpp-ubuntu-mingw:latest
490
+ images : aminya/setup-cpp-ubuntu-mingw:22.04-1.1.1-amd64,aminya/setup-cpp-ubuntu-mingw:22.04-1.1.1-arm64
491
+ push : true
492
+ amend : true
493
+
374
494
Release :
375
495
if : startsWith(github.ref, 'refs/tags/')
376
496
needs : [Build, BuildExecutable, Test]
0 commit comments