diff --git a/scripts/github-actions/munge-i386.sh b/scripts/github-actions/munge-i386.sh index b33339ed..696b878b 100755 --- a/scripts/github-actions/munge-i386.sh +++ b/scripts/github-actions/munge-i386.sh @@ -7,11 +7,12 @@ jq --arg dpkgSmokeTest '[ "$(dpkg --print-architecture)" = "amd64" ]' ' | select(.name | test(" [(].+[)]") | not) # ignore any existing munged builds | select(.os | startswith("windows-") | not) | .name += " (i386)" + | .meta.froms as $froms | .runs.pull = ([ "# pull i386 variants of base images for multi-architecture testing", $dpkgSmokeTest, ( - .meta.froms[] + $froms[] | ("i386/" + . | @sh) as $i386 | ( "docker pull " + $i386, @@ -19,5 +20,7 @@ jq --arg dpkgSmokeTest '[ "$(dpkg --print-architecture)" = "amd64" ]' ' ) ) ] | join("\n")) + # adjust "docker buildx build" lines to include appropriate "--build-context" flags (https://github.com/docker/buildx/pull/1886) + | .runs.build |= ( gsub("docker buildx build "; "docker buildx build " + ($froms | unique | map(@sh "--build-context \(.)=docker-image://\("i386/" + .)") | join(" ")) + " ") | gsub( "--platform[= ]linux/[^ ]+"; "--platform linux/386") ) ] ' "$@"