-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ubuntu/image: Upload as artefact in PRs
Signed-off-by: Ryan Northey <[email protected]>
- Loading branch information
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,9 @@ on: | |
test_toolchain: | ||
type: boolean | ||
default: false | ||
upload_ubuntu_image: | ||
type: boolean | ||
default: false | ||
|
||
host_platform: | ||
type: string | ||
|
@@ -93,10 +96,21 @@ jobs: | |
go-version: ${{ inputs.go_version }} | ||
cache: false | ||
- uses: envoyproxy/toolshed/gh-actions/docker/[email protected] | ||
if: ${{ inputs.test_toolchain && inputs.os_family != 'windows' }} | ||
if: ${{ (inputs.test_toolchain || inputs.upload_ubuntu_image) && inputs.os_family != 'windows' }} | ||
name: 'Start and load Docker registry' | ||
with: | ||
load: envoyproxy/envoy-build-ubuntu:${{ steps.container.outputs.tag }} | ||
- run: | | ||
cd docker | ||
docker buildx build --platform linux/arm64 --push -t localhost:5000/envoyproxy/envoy-build-ubuntu:${{ steps.container.outputs.tag }}-arm64 . | ||
docker manifest create \ | ||
envoyproxy/envoy-build-ubuntu:${{ steps.container.outputs.tag }}-multi \ | ||
envoyproxy/envoy-build-ubuntu:${{ steps.container.outputs.tag }} \ | ||
envoyproxy/envoy-build-ubuntu:${{ steps.container.outputs.tag }}-arm64 | ||
if: ${{ inputs.upload_ubuntu_image }} | ||
shell: bash | ||
- uses: envoyproxy/toolshed/gh-actions/docker/[email protected] | ||
if: ${{ inputs.test_toolchain && inputs.os_family == 'windows' }} | ||
name: 'Start and load Docker registry (Windows)' | ||
|
@@ -112,3 +126,16 @@ jobs: | |
SOURCE_BRANCH: ${{ github.ref }} | ||
NO_PULL_IMAGE: true | ||
DOCKER_IMAGE: localhost:5000/envoy-build-${{ inputs.distro }} | ||
- run: | | ||
sudo mkdir -p /mnt/cache | ||
sudo mount -t tmpfs none /mnt/cache | ||
docker save envoyproxy/envoy-build-ubuntu:${{ steps.container.outputs.tag }}-multi \ | ||
| zstd - -q -T0 -o /mnt/cache/envoy-build-ubuntu-${{ steps.container.outputs.tag }}.tar.zst | ||
if: ${{ inputs.upload_ubuntu_image }} | ||
shell: bash | ||
- uses: actions/upload-artifact@v3 | ||
if: ${{ inputs.upload_ubuntu_image }} | ||
with: | ||
name: envoy-build-ubuntu-${{ steps.container.outputs.tag }} | ||
path: /mnt/cache/envoy-build-ubuntu-${{ steps.container.outputs.tag }}.tar.zst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters