2222 outputs :
2323 backend-artifact-name :
2424 description : " Name of the backend artifact"
25- value : ${{ jobs.build-test-images.outputs.artifact-name }}
25+ value : ${{ jobs.build-test-images.outputs.backend- artifact-name }}
2626 frontend-artifact-name :
2727 description : " Name of the frontend artifact"
28- value : ${{ jobs.build-test-images-frontend .outputs.artifact-name }}
28+ value : ${{ jobs.build-test-images.outputs.frontend- artifact-name }}
2929
3030jobs :
3131 build-test-images :
32- if : ${{ inputs.build-backend }}
32+ strategy :
33+ matrix :
34+ type : [backend, frontend]
35+ exclude :
36+ - type : backend
37+ condition : ${{ !inputs.build-backend }}
38+ - type : frontend
39+ condition : ${{ !inputs.build-frontend }}
3340 timeout-minutes : 30
3441 runs-on : ${{ inputs.os }}
3542 outputs :
36- artifact-name : docker-buildx-images-${{ runner.os }}-${{ github.sha }}-backend
43+ backend-artifact-name : ${{ matrix.type == 'backend' && format('docker-buildx-images-{0}-{1}-backend', runner.os, github.sha) || '' }}
44+ frontend-artifact-name : ${{ matrix.type == 'frontend' && format('docker-buildx-images-{0}-{1}-frontend', runner.os, github.sha) || '' }}
3745 steps :
3846 - uses : actions/checkout@v4
3947 - name : setup docker buildx
@@ -49,37 +57,13 @@ jobs:
4957 run : |
5058 export DOCKER_IMAGE_TAG=$(exec ci/helpers/build_docker_image_tag.bash)
5159 mkdir --parents /${{ runner.temp }}/build
52- make build local-dest=/${{ runner.temp }}/build exclude=static-webserver
60+ if [ "${{ matrix.type }}" = "backend" ]; then
61+ make build local-dest=/${{ runner.temp }}/build exclude=static-webserver
62+ else
63+ make build local-dest=/${{ runner.temp }}/build target=static-webserver
64+ fi
5365 - name : upload build artifacts
5466 uses : actions/upload-artifact@v4
5567 with :
56- name : docker-buildx-images-${{ runner.os }}-${{ github.sha }}-backend
57- path : /${{ runner.temp }}/build
58-
59- build-test-images-frontend :
60- if : ${{ inputs.build-frontend }}
61- timeout-minutes : 30
62- runs-on : ${{ inputs.os }}
63- outputs :
64- artifact-name : docker-buildx-images-${{ runner.os }}-${{ github.sha }}-frontend
65- steps :
66- - uses : actions/checkout@v4
67- - name : setup docker buildx
68- id : buildx
69- uses : docker/setup-buildx-action@v3
70- with :
71- driver : docker-container
72- - name : expose github runtime for buildx
73- uses : crazy-max/ghaction-github-runtime@v3
74- - name : show system environs
75- run : ./ci/helpers/show_system_versions.bash
76- - name : build images
77- run : |
78- export DOCKER_IMAGE_TAG=$(exec ci/helpers/build_docker_image_tag.bash)
79- mkdir --parents /${{ runner.temp }}/build
80- make build local-dest=/${{ runner.temp }}/build target=static-webserver
81- - name : upload build artifacts
82- uses : actions/upload-artifact@v4
83- with :
84- name : docker-buildx-images-${{ runner.os }}-${{ github.sha }}-frontend
68+ name : docker-buildx-images-${{ runner.os }}-${{ github.sha }}-${{ matrix.type }}
8569 path : /${{ runner.temp }}/build
0 commit comments