Skip to content

Commit

Permalink
Merge pull request #80 from infosiftr/i386-build-context
Browse files Browse the repository at this point in the history
Update "munge-i386" to add "--build-context" in "docker buildx build" lines
  • Loading branch information
yosifkit authored Oct 24, 2023
2 parents a9fce37 + d3dede4 commit a70de23
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/github-actions/munge-i386.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,20 @@ 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,
"docker tag " + $i386 + " " + @sh
)
)
] | 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") )
]
' "$@"

0 comments on commit a70de23

Please sign in to comment.