Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update "munge-i386" to add "--build-context" in "docker buildx build" lines #80

Merged
merged 2 commits into from
Oct 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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") )
]
' "$@"