File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed
Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -126,16 +126,19 @@ jobs:
126126 type=ref,event=pr
127127 type=ref,event=tag
128128 type=sha,format=long
129+ - name : Set up QEMU
130+ uses : docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
131+ with :
132+ platforms : linux/amd64,linux/arm64
129133 - name : Build (and push if needed)
130134 uses : docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
131135 with :
132136 context : .
133137 file : Dockerfile.build-image
138+ platforms : linux/amd64,linux/arm64
134139 tags : ${{ steps.meta.outputs.tags }}
135140 labels : ${{ steps.meta.outputs.labels }}
136141 push : ${{ github.ref == 'refs/heads/main' }}
137- # Only load on PR builds
138- load : ${{ github.ref != 'refs/heads/main' }}
139142 - name : Run container image vulnerability scanner
140143 uses : aquasecurity/trivy-action@d710430a6722f083d3b36b8339ff66b32f22ee55 # 0.19.0
141144 with :
Original file line number Diff line number Diff line change @@ -25,13 +25,20 @@ RUN apt-get update && \
2525ENV USER=root
2626
2727ARG NIX_VERSION=2.25.0
28- RUN wget https://nixos.org/releases/nix/nix-${NIX_VERSION}/nix-${NIX_VERSION}-x86_64-linux.tar.xz && \
29- tar xf nix-${NIX_VERSION}-x86_64-linux.tar.xz && \
28+
29+ RUN \
30+ if [ "$TARGETARCH" = "amd64" ]; then \
31+ export ARCH=x86_64; \
32+ else \
33+ export ARCH=aarch64; \
34+ fi && \
35+ wget https://nixos.org/releases/nix/nix-${NIX_VERSION}/nix-${NIX_VERSION}-${ARCH}-linux.tar.xz && \
36+ tar xf nix-${NIX_VERSION}-${ARCH}-linux.tar.xz && \
3037 groupadd -r -g 30000 nixbld && \
3138 for i in $(seq 1 30); do useradd -rM -u $((30000 + i)) -G nixbld nixbld$i ; done && \
3239 mkdir -m 0755 /etc/nix /nix && \
3340 printf "sandbox = false\n filter-syscalls = false\n " > /etc/nix/nix.conf && \
34- nix-${NIX_VERSION}-x86_64 -linux/install && \
41+ nix-${NIX_VERSION}-${ARCH} -linux/install && \
3542 ln -s /nix/var/nix/profiles/default/etc/profile.d/nix.sh /etc/profile.d && \
3643 rm -rf nix-*
3744
You can’t perform that action at this time.
0 commit comments