Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
vicamo committed Feb 3, 2025
1 parent 8b761e6 commit 47a675a
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,29 +182,34 @@ jobs:
UNAVAILABLES: ${{ steps.processing.outputs.unavailables }}
run: |
available='[]'
echo -n "Retrieving image manifest for "
for image in $({ echo "${CODENAMES}"; echo "${UNAVAILABLES}"; } |
jq -s 'map(.[])' |
jq -r -M '.[] | .distribution + ":" + .codename' |
sort -u); do
echo -n "$image, "
read -r -a platforms <<<"$({ docker buildx imagetools inspect "vicamo/$image" 2>/dev/null; true; } |
awk '/Platform: +linux/ { print $2 }' |
tr '\n' ' ')"
platforms_json="$(jq -c -M -n '$ARGS.positional' --args "${platforms[@]}")"
available="$(echo "${available}" |
jq -c -M '. + [{ "image":"'"${image}"'", "platforms":'"${platforms_json}"' }]')"
done
echo
echo "::group::Availables"
echo "${available}" | jq
echo "::endgroup::"
unbuildables="$(echo "${CODENAMES}" |
jq -c -M 'map(. as $s | {
jq -c -M 'map(. as $s |
('"${available}"' | map(select(.image == ($s.distribution + ":" + $s.codename))) | map(.platforms[])) as $available |
{
"codename":$s.codename,
"platforms": (
($s.architectures | fromjson | map(.platform)) as $claimed |
('"${available}"' | map(select(.image == ($s.distribution + ":" + $s.codename))) | map(.platforms[])) as $available |
$claimed - $available
"platforms":(
$s.architectures | fromjson |
map(select(. as $a | $available | map(select(. == $a.platform)) | length > 0)) |
map(.arch)
)
}) |
map(select(.platforms | length > 0))')"
Expand Down

0 comments on commit 47a675a

Please sign in to comment.