From aefbae3b477649c5ab7f2382c651c6d7ebd85c43 Mon Sep 17 00:00:00 2001 From: Kyle Harding Date: Tue, 30 Jan 2024 16:22:05 -0500 Subject: [PATCH] Build and publish helper images with Flowzone Rather than build helper images on demand, we will publish them to ghcr.io with every revision of this project. Change-type: minor Signed-off-by: Kyle Harding --- .github/workflows/flowzone.yml | 4 +++ automation/Dockerfile_balena-img-s3 | 1 + docker-bake.hcl | 44 +++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 automation/Dockerfile_balena-img-s3 create mode 100644 docker-bake.hcl diff --git a/.github/workflows/flowzone.yml b/.github/workflows/flowzone.yml index 3ed107163..0ae3e072e 100644 --- a/.github/workflows/flowzone.yml +++ b/.github/workflows/flowzone.yml @@ -26,3 +26,7 @@ jobs: github.event_name == 'pull_request_target' ) secrets: inherit + with: + docker_images: | + ghcr.io/balena-os/balena-yocto-scripts + bake_targets: yocto-build-env,block-build-env,balena-push-env,generate-ami-env,balena-img-s3 diff --git a/automation/Dockerfile_balena-img-s3 b/automation/Dockerfile_balena-img-s3 new file mode 100644 index 000000000..f24c8fc96 --- /dev/null +++ b/automation/Dockerfile_balena-img-s3 @@ -0,0 +1 @@ +FROM balena/balena-img:6.20.26 diff --git a/docker-bake.hcl b/docker-bake.hcl new file mode 100644 index 000000000..9306cb9de --- /dev/null +++ b/docker-bake.hcl @@ -0,0 +1,44 @@ +target "yocto-build-env" { + context = "automation" + dockerfile = "Dockerfile_yocto-build-env" + platforms = [ + "linux/amd64", + // "linux/arm64" + ] +} + +target "block-build-env" { + context = "automation" + dockerfile = "Dockerfile_yocto-block-build-env" + platforms = [ + "linux/amd64", + // "linux/arm64" + ] +} + +target "balena-push-env" { + context = "automation" + dockerfile = "Dockerfile_balena-push-env" + platforms = [ + "linux/amd64", + // "linux/arm64" + ] +} + +target "generate-ami-env" { + context = "automation" + dockerfile = "Dockerfile_balena-generate-ami-env" + platforms = [ + "linux/amd64", + // "linux/arm64" + ] +} + +target "balena-img-s3" { + context = "automation" + dockerfile = "Dockerfile_balena-img-s3" + platforms = [ + "linux/amd64", + "linux/arm64" + ] +}