2525 test_toolchain :
2626 type : boolean
2727 default : false
28+ upload_ubuntu_image :
29+ type : boolean
30+ default : false
2831
2932 host_platform :
3033 type : string
@@ -93,10 +96,21 @@ jobs:
9396 go-version : ${{ inputs.go_version }}
9497 cache : false
9598 -
uses :
envoyproxy/toolshed/gh-actions/docker/[email protected] 96- if : ${{ inputs.test_toolchain && inputs.os_family != 'windows' }}
99+ if : ${{ ( inputs.test_toolchain || inputs.upload_ubuntu_image) && inputs.os_family != 'windows' }}
97100 name : ' Start and load Docker registry'
98101 with :
99102 load : envoyproxy/envoy-build-ubuntu:${{ steps.container.outputs.tag }}
103+ - run : |
104+ cd docker
105+ docker buildx build --platform linux/arm64 --push -t localhost:5000/envoyproxy/envoy-build-ubuntu:${{ steps.container.outputs.tag }}-arm64 .
106+ docker manifest create \
107+ envoyproxy/envoy-build-ubuntu:${{ steps.container.outputs.tag }}-multi \
108+ envoyproxy/envoy-build-ubuntu:${{ steps.container.outputs.tag }} \
109+ envoyproxy/envoy-build-ubuntu:${{ steps.container.outputs.tag }}-arm64
110+
111+ if: ${{ inputs.upload_ubuntu_image }}
112+ shell: bash
113+
100114 -
uses :
envoyproxy/toolshed/gh-actions/docker/[email protected] 101115 if : ${{ inputs.test_toolchain && inputs.os_family == 'windows' }}
102116 name : ' Start and load Docker registry (Windows)'
@@ -112,3 +126,16 @@ jobs:
112126 SOURCE_BRANCH: ${{ github.ref }}
113127 NO_PULL_IMAGE: true
114128 DOCKER_IMAGE: localhost:5000/envoy-build-${{ inputs.distro }}
129+
130+ - run : |
131+ sudo mkdir -p /mnt/cache
132+ sudo mount -t tmpfs none /mnt/cache
133+ docker save envoyproxy/envoy-build-ubuntu:${{ steps.container.outputs.tag }}-multi \
134+ | zstd - -q -T0 -o /mnt/cache/envoy-build-ubuntu-${{ steps.container.outputs.tag }}.tar.zst
135+ if: ${{ inputs.upload_ubuntu_image }}
136+ shell: bash
137+ - uses : actions/upload-artifact@v3
138+ if : ${{ inputs.upload_ubuntu_image }}
139+ with :
140+ name : envoy-build-ubuntu-${{ steps.container.outputs.tag }}
141+ path : /mnt/cache/envoy-build-ubuntu-${{ steps.container.outputs.tag }}.tar.zst
0 commit comments