1919 required : true
2020 type : string
2121 description : " Runner OS to use"
22- outputs :
23- backend-artifact-name :
24- description : " Name of the backend artifact"
25- value : ${{ jobs.build-test-images.outputs.backend-artifact-name }}
26- frontend-artifact-name :
27- description : " Name of the frontend artifact"
28- value : ${{ jobs.build-test-images.outputs.frontend-artifact-name }}
2922
3023jobs :
3124 build-test-images :
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 }}
4025 timeout-minutes : 30
4126 runs-on : ${{ inputs.os }}
42- outputs :
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) || '' }}
4527 steps :
4628 - uses : actions/checkout@v4
4729 - name : setup docker buildx
@@ -53,17 +35,27 @@ jobs:
5335 uses : crazy-max/ghaction-github-runtime@v3
5436 - name : show system environs
5537 run : ./ci/helpers/show_system_versions.bash
56- - name : build images
38+ - name : build backend images
39+ if : ${{ inputs.build-backend }}
5740 run : |
5841 export DOCKER_IMAGE_TAG=$(exec ci/helpers/build_docker_image_tag.bash)
5942 mkdir --parents /${{ runner.temp }}/build
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
65- - name : upload build artifacts
43+ make build local-dest=/${{ runner.temp }}/build exclude=static-webserver
44+ - name : build frontend images
45+ if : ${{ inputs.build-frontend }}
46+ run : |
47+ export DOCKER_IMAGE_TAG=$(exec ci/helpers/build_docker_image_tag.bash)
48+ mkdir --parents /${{ runner.temp }}/build
49+ make build local-dest=/${{ runner.temp }}/build target=static-webserver
50+ - name : upload backend artifacts
51+ if : ${{ inputs.build-backend }}
52+ uses : actions/upload-artifact@v4
53+ with :
54+ name : docker-buildx-images-${{ runner.os }}-${{ github.sha }}-backend
55+ path : /${{ runner.temp }}/build
56+ - name : upload frontend artifacts
57+ if : ${{ inputs.build-frontend }}
6658 uses : actions/upload-artifact@v4
6759 with :
68- name : docker-buildx-images-${{ runner.os }}-${{ github.sha }}-${{ matrix.type }}
60+ name : docker-buildx-images-${{ runner.os }}-${{ github.sha }}-frontend
6961 path : /${{ runner.temp }}/build
0 commit comments