Merge pull request #81 from tianon/github-actions-platform

Add "--platform" to GHA generate script
This commit is contained in:
yosifkit 2023-10-25 09:37:26 -07:00 committed by GitHub
commit 07ad7060aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -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(