From 0e6bdaabd68bfbc8181ee426a7304a3e92a1ff79 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 14 Sep 2023 16:17:49 -0700 Subject: [PATCH] Add "--platform" to GHA generate script --- scripts/github-actions/generate.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/github-actions/generate.sh b/scripts/github-actions/generate.sh index d50e67c8..5d240cfd 100755 --- a/scripts/github-actions/generate.sh +++ b/scripts/github-actions/generate.sh @@ -53,7 +53,8 @@ for tag in $tags; do "file": {{- json ($e.ArchFile $arch) -}}, "builder": {{- json ($e.ArchBuilder $arch) -}}, "constraints": {{- json $e.Constraints -}}, - "froms": {{- json ($.ArchDockerFroms $arch $e) -}} + "froms": {{- json ($.ArchDockerFroms $arch $e) -}}, + "platform": {{- json (ociPlatform $arch).String -}} {{- "}" -}} ' "$bashbrewImage" | jq -c ' { @@ -84,6 +85,10 @@ for tag in $tags; do "echo >&2 " + ("error: unknown/unsupported builder: " + .builder | @sh) + "\nexit 1\n#" end ] + + [ + # TODO error out on unsupported platforms, or just let the emulation go wild? + "--platform", .platform + ] + ( .tags | map(