Skip to content

Commit a70de23

Browse files
authored
Merge pull request #80 from infosiftr/i386-build-context
Update "munge-i386" to add "--build-context" in "docker buildx build" lines
2 parents a9fce37 + d3dede4 commit a70de23

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/github-actions/munge-i386.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,20 @@ jq --arg dpkgSmokeTest '[ "$(dpkg --print-architecture)" = "amd64" ]' '
77
| select(.name | test(" [(].+[)]") | not) # ignore any existing munged builds
88
| select(.os | startswith("windows-") | not)
99
| .name += " (i386)"
10+
| .meta.froms as $froms
1011
| .runs.pull = ([
1112
"# pull i386 variants of base images for multi-architecture testing",
1213
$dpkgSmokeTest,
1314
(
14-
.meta.froms[]
15+
$froms[]
1516
| ("i386/" + . | @sh) as $i386
1617
| (
1718
"docker pull " + $i386,
1819
"docker tag " + $i386 + " " + @sh
1920
)
2021
)
2122
] | join("\n"))
23+
# adjust "docker buildx build" lines to include appropriate "--build-context" flags (https://github.com/docker/buildx/pull/1886)
24+
| .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") )
2225
]
2326
' "$@"

0 commit comments

Comments
 (0)