Skip to content

Commit 96ec2e6

Browse files
committed
actions: allow creation of the arm64 container
1 parent e252530 commit 96ec2e6

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

.github/workflows/build.yml

+8-5
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ concurrency:
2121

2222
jobs:
2323
binary:
24-
runs-on: ${{ matrix.host_os }}
24+
runs-on: ${{ matrix.runner }}
2525

2626
strategy:
2727
matrix:
@@ -31,7 +31,7 @@ jobs:
3131

3232
include:
3333
- arch: arm64
34-
host_os: macos-latest
34+
runner: macos-latest
3535

3636
steps:
3737
- uses: actions/checkout@v4
@@ -68,7 +68,7 @@ jobs:
6868
retention-days: 1
6969

7070
docker:
71-
runs-on: ${{ matrix.host_os }}
71+
runs-on: ${{ matrix.runner }}
7272

7373
permissions:
7474
packages: write
@@ -79,11 +79,14 @@ jobs:
7979
arch:
8080
- amd64
8181
# The emulated arm64 builds are painfully slow (90m last time). Skip them until we have dedicated linux-arm64 hardware.
82-
# - arm64
82+
- arm64
8383

8484
include:
8585
- arch: amd64
86-
host_os: ubuntu-latest
86+
runner: ubuntu-latest
87+
88+
- arch: arm64
89+
runner: buildjet-4vcpu-ubuntu-2204-arm
8790

8891
steps:
8992
- uses: actions/checkout@v4

.github/workflows/release.yml

+3
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ jobs:
4545
path: /tmp/digests
4646
pattern: digests-*
4747

48+
- name: Set up QEMU
49+
uses: docker/setup-qemu-action@v3
50+
4851
- name: buildx
4952
uses: docker/setup-buildx-action@v3
5053

justfile

+4-2
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,12 @@ extract-from-digests:
4545

4646
for digest in /tmp/digests/*/*; do
4747
sha="$(basename "${digest}")"
48-
name="kuberift-$(basename $(dirname "${digest}") | cut -d- -f2-)"
48+
bucket="$(basename $(dirname "${digest}"))"
49+
IFS=- read -r _ os arch <<< "${bucket}"
50+
name="kuberift-${os}-${arch}"
4951
echo "Extracting {{ image }}@sha256:${sha}"
5052

51-
container_id="$(docker create {{ image }}@sha256:${sha})"
53+
container_id="$(docker create --platform=${os}/${arch} {{ image }}@sha256:${sha})"
5254
docker cp "${container_id}:/usr/local/bin/kuberift" "/tmp/bins/${name}"
5355
docker rm "${container_id}"
5456
done

0 commit comments

Comments
 (0)