From b7c6305e06270b37f078f0142e783b5f51c12731 Mon Sep 17 00:00:00 2001 From: jt-dd <112463504+jt-dd@users.noreply.github.com> Date: Fri, 2 Aug 2024 10:27:30 +0200 Subject: [PATCH] Fix-darwin-arm-release (#237) * fix darwin arm release * typo release name --- .github/workflows/buildx.yml | 4 ++-- Dockerfile | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/buildx.yml b/.github/workflows/buildx.yml index 76a5d07df..7bf843f62 100644 --- a/.github/workflows/buildx.yml +++ b/.github/workflows/buildx.yml @@ -86,7 +86,7 @@ jobs: name: Upload artifacts uses: actions/upload-artifact@v3 with: - name: compose + name: kubehound path: ./bin/release/* if-no-files-found: error @@ -105,7 +105,7 @@ jobs: name: Download artifacts uses: actions/download-artifact@v3 with: - name: compose + name: kubehound path: bin/release - name: Create checksums diff --git a/Dockerfile b/Dockerfile index 297259da6..82b5a4414 100644 --- a/Dockerfile +++ b/Dockerfile @@ -97,7 +97,8 @@ RUN --mount=from=binary \ mkdir -p /out && \ # TODO: should just use standard arch TARGETARCH=$([ "$TARGETARCH" = "amd64" ] && echo "x86_64" || echo "$TARGETARCH"); \ - TARGETARCH=$([ "$TARGETARCH" = "arm64" ] && echo "aarch64" || echo "$TARGETARCH"); \ + # Use arm64 for darwin + TARGETARCH=$([ "$TARGETARCH" = "arm64" ] && [ "$TARGETOS" != "darwin" ] && echo "aarch64" || echo "$TARGETARCH"); \ cp kubehound* "/out/kubehound-${TARGETOS}-${TARGETARCH}${TARGETVARIANT}$(ls kubehound* | sed -e 's/^kubehound//')" FROM scratch AS release