From 0ec04058cd2d22c8809a5a37e1591e937464e0a1 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sun, 14 Aug 2022 22:29:57 +0200 Subject: [PATCH] ci: fix checksums file Signed-off-by: CrazyMax --- .github/workflows/ci.yml | 6 ++++++ Dockerfile | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e7af40b02..f9a2ede2b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -195,6 +195,12 @@ jobs: with: name: compose path: ${{ env.DESTDIR }} + - + name: Create checksums + working-directory: ${{ env.DESTDIR }} + run: | + find . -type f -print0 | sort -z | xargs -r0 shasum -a 256 -b | sed 's# .*/# #' > checksums.txt + shasum -a 256 -U -c checksums.txt - name: License run: cp packaging/* ${{ env.DESTDIR }}/ diff --git a/Dockerfile b/Dockerfile index 856b6a0a6..bd78ad296 100644 --- a/Dockerfile +++ b/Dockerfile @@ -167,7 +167,6 @@ COPY --link --from=build /usr/bin/docker-compose /docker-compose.exe FROM binary-$TARGETOS AS binary FROM --platform=$BUILDPLATFORM alpine AS releaser -RUN apk add --no-cache file perl-utils WORKDIR /work ARG TARGETOS ARG TARGETARCH @@ -177,8 +176,7 @@ RUN --mount=from=binary \ # TODO: should just use standard arch TARGETARCH=$([ "$TARGETARCH" = "amd64" ] && echo "x86_64" || echo "$TARGETARCH"); \ TARGETARCH=$([ "$TARGETARCH" = "arm64" ] && echo "aarch64" || echo "$TARGETARCH"); \ - cp docker-compose* "/out/docker-compose-${TARGETOS}-${TARGETARCH}${TARGETVARIANT}$(ls docker-compose* | sed -e 's/^docker-compose//')" && \ - (cd /out ; for f in *; do shasum --binary --algorithm 256 $f | tee -a /out/checksums.txt > $f.sha256; done) + cp docker-compose* "/out/docker-compose-${TARGETOS}-${TARGETARCH}${TARGETVARIANT}$(ls docker-compose* | sed -e 's/^docker-compose//')" FROM scratch AS release COPY --from=releaser /out/ /