5454 if [[ "${{ github.ref_name }}" =~ ^refs/heads/ ]]; then
5555 git config user.name "github-actions[bot]"
5656 git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
57-
57+
5858 git add dist/
5959 git commit -m "chore(build): update dist"
6060 git push
@@ -253,26 +253,46 @@ jobs:
253253 with :
254254 name : dist
255255
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+
256265 - name : Login to Docker Hub
257266 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]') }}
259268 with :
260269 username : aminya
261270 password : ${{ secrets.DOCKERHUB_TOKEN }}
262271
263272 - name : Build setup-cpp-${{matrix.container.distro }}
273+ id : build_base
264274 uses : docker/build-push-action@v6
265275 with :
266276 context : .
267277 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
269281 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 }}
271283 cache-from : type=registry,ref=aminya/${{ matrix.container.image }}:latest
272284 cache-to : type=inline
273285
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+
274294 - 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]') }}
276296 uses : peter-evans/dockerhub-description@v4
277297 with :
278298 username : aminya
@@ -281,18 +301,29 @@ jobs:
281301 readme-filepath : ./README_DOCKER.md
282302
283303 - name : Build setup-cpp-${{matrix.container.distro }}-llvm
304+ id : build_llvm
284305 uses : docker/build-push-action@v6
285306 with :
286307 context : .
287308 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
289312 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 }}
291314 cache-from : type=registry,ref=aminya/${{ matrix.container.image }}-llvm:latest
292315 cache-to : type=inline
293316
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+
294325 - 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]') }}
296327 uses : peter-evans/dockerhub-description@v4
297328 with :
298329 username : aminya
@@ -311,18 +342,29 @@ jobs:
311342 tags : aminya/test-${{ matrix.container.image }}-llvm:${{ matrix.container.tag }}
312343
313344 - name : Build setup-cpp-${{matrix.container.distro }}-gcc
345+ id : build_gcc
314346 uses : docker/build-push-action@v6
315347 with :
316348 context : .
317349 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
319353 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 }}
321355 cache-from : type=registry,ref=aminya/${{ matrix.container.image }}-gcc:latest
322356 cache-to : type=inline
323357
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+
324366 - 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]') }}
326368 uses : peter-evans/dockerhub-description@v4
327369 with :
328370 username : aminya
@@ -341,17 +383,29 @@ jobs:
341383 tags : aminya/test-${{ matrix.container.image }}-gcc:${{ matrix.container.tag }}
342384
343385 - 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' }}
345388 uses : docker/build-push-action@v6
346389 with :
347390 context : .
348391 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
350395 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 }}
352397 cache-from : type=registry,ref=aminya/${{ matrix.container.image }}-mingw:latest
353398 cache-to : type=inline
354399
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+
355409 - name : Docker Readme for setup-cpp-${{matrix.container.distro }}-mingw
356410 if : ${{ github.event_name != 'pull_request' && matrix.container.distro != 'fedora' }}
357411 uses : peter-evans/dockerhub-description@v4
@@ -362,7 +416,7 @@ jobs:
362416 readme-filepath : ./README_DOCKER.md
363417
364418 - 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' }}
366420 uses : docker/build-push-action@v6
367421 with :
368422 context : .
@@ -371,6 +425,72 @@ jobs:
371425 platforms : ${{ matrix.platform }}
372426 tags : aminya/test-${{ matrix.container.image }}-mingw:${{ matrix.container.tag }}
373427
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+
374494 Release :
375495 if : startsWith(github.ref, 'refs/tags/')
376496 needs : [Build, BuildExecutable, Test]
0 commit comments