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
5154 if : ${{ inputs.os_family != 'windows' }}
5255 - name : ' Checkout repository'
5356 uses : actions/checkout@v3
57+ -
uses :
envoyproxy/toolshed/gh-actions/docker/[email protected] 58+ if : ${{ (inputs.test_toolchain || inputs.upload_ubuntu_image) && inputs.os_family != 'windows' }}
59+ name : ' Start Docker registry'
5460 - run : |
5561 CONTAINER_TAG=$(git log -1 --pretty=format:"%H" "./docker")
5662 echo "tag=${CONTAINER_TAG}" >> "$GITHUB_OUTPUT"
9298 with :
9399 go-version : ${{ inputs.go_version }}
94100 cache : false
95- -
uses :
envoyproxy/toolshed/gh-actions/docker/[email protected] 96- if : ${{ inputs.test_toolchain && inputs.os_family != 'windows' }}
97- name : ' Start and load Docker registry'
98- with :
99- load : envoyproxy/envoy-build-ubuntu:${{ steps.container.outputs.tag }}
100101 -
uses :
envoyproxy/toolshed/gh-actions/docker/[email protected] 101102 if : ${{ inputs.test_toolchain && inputs.os_family == 'windows' }}
102103 name : ' Start and load Docker registry (Windows)'
@@ -112,3 +113,15 @@ jobs:
112113 SOURCE_BRANCH: ${{ github.ref }}
113114 NO_PULL_IMAGE: true
114115 DOCKER_IMAGE: localhost:5000/envoy-build-${{ inputs.distro }}
116+ - run : |
117+ sudo mkdir -p /mnt/cache
118+ sudo mount -t tmpfs none /mnt/cache
119+ docker save envoyproxy/envoy-build-ubuntu:${{ steps.container.outputs.tag }}-multi \
120+ | zstd - -q -T0 -o /mnt/cache/envoy-build-ubuntu-${{ steps.container.outputs.tag }}.tar.zst
121+ if: ${{ inputs.upload_ubuntu_image }}
122+ shell: bash
123+ - uses : actions/upload-artifact@v3
124+ if : ${{ inputs.upload_ubuntu_image }}
125+ with :
126+ name : envoy-build-ubuntu-${{ steps.container.outputs.tag }}
127+ path : /mnt/cache/envoy-build-ubuntu-${{ steps.container.outputs.tag }}.tar.zst
0 commit comments