💚 fix platforms 2: electric boogaloo?

This commit is contained in:
Louis Orleans 2023-09-01 11:05:51 -07:00
parent 7edbba2176
commit 33cd306ec2
No known key found for this signature in database
2 changed files with 25 additions and 1 deletions

View File

@ -43,7 +43,8 @@ jobs:
- name: 'Set target build platforms 📝' - name: 'Set target build platforms 📝'
id: 'target-platforms' id: 'target-platforms'
run: | run: |
echo "target_platforms=linux/amd64,linux/${{ steps.qemu.outputs.platforms }}/v8" >> "$GITHUB_OUTPUT" qemu_platforms="$(.github/workflows/scripts/convert-arch-to-platform.sh "${{ steps.qemu.outputs.platforms }}")"
echo "target_platforms=$qemu_platforms" >> "$GITHUB_OUTPUT"
- name: 'Build container 🐳' - name: 'Build container 🐳'
id: 'build' id: 'build'

View File

@ -0,0 +1,23 @@
#!/usr/bin/env bash
qemu_platforms=""
for p in $(echo "$1" | tr ',' '\n'); do
v=""
case "$p" in
"linux/arm64")
v="$p/v8" ;;
# Skip platforms we don't need
"linux/386") ;;
*)
v="$p" ;;
esac
if [ -z "$qemu_platforms" ]; then
qemu_platforms="$v"
else
qemu_platforms="$qemu_platforms,$v"
fi
done
echo "$qemu_platforms"