Skip to content

Commit

Permalink
Merge pull request #9750 from crazy-max/fix-checksums
Browse files Browse the repository at this point in the history
ci: fix checksums file
  • Loading branch information
glours authored Aug 15, 2022
2 parents 8d12042 + 0ec0405 commit abc73ed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}/
Expand Down
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/ /
Expand Down

0 comments on commit abc73ed

Please sign in to comment.