Skip to content

Commit

Permalink
Merge pull request gythialy#288 from gythialy/feature/check-for-update
Browse files Browse the repository at this point in the history
  • Loading branch information
cpanato authored May 20, 2024
2 parents 822e47a + 068d5b6 commit 9768ae5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
21 changes: 19 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,26 @@ LABEL org.opencontainers.image.source https://github.com/gythialy/golang-cross
COPY entrypoint.sh /

# install cosign
COPY --from=ghcr.io/sigstore/cosign/cosign:v2.2.4@sha256:bed7ba33a8610c1607c16dee696f62bad168814016126abb9da01e9fb7cb2167 /ko-app/cosign /usr/local/bin/cosign
ARG COSIGN_VERSION=v2.2.4
ARG COSIGN_SHA=97a6a1e15668a75fc4ff7a4dc4cb2f098f929cbea2f12faa9de31db6b42b17d7
RUN \
COSIGN_DOWNLOAD_FILE=cosign-linux-amd64 && \
wget -O $COSIGN_DOWNLOAD_FILE https://github.com/sigstore/cosign/releases/download/${COSIGN_VERSION}/${COSIGN_DOWNLOAD_FILE} && \
echo "$COSIGN_SHA $COSIGN_DOWNLOAD_FILE" | sha256sum -c - || exit 1 && \
mv $COSIGN_DOWNLOAD_FILE /usr/local/bin/cosign && \
chmod +x /usr/local/bin/cosign && \
cosign version

# install syft
COPY --from=docker.io/anchore/syft:v1.4.1@sha256:24feb76496d558c52a09a859de569fc71cb147d9aff01edab885accae5363150 /syft /usr/local/bin/syft
ARG SYFT_VERSION=v1.4.1
ARG SYFT_SHA=5e4c6a0d1ca28d25e060a29c7cca0aedc50d951bfb270b45bc9a71e86ac6fbe2
RUN \
SYFT_DOWNLOAD_FILE=syft_${SYFT_VERSION#v}_linux_amd64.tar.gz && \
SYFT_DOWNLOAD_URL=https://github.com/anchore/syft/releases/download/${SYFT_VERSION}/${SYFT_DOWNLOAD_FILE} && \
wget ${SYFT_DOWNLOAD_URL} && \
echo "$SYFT_SHA $SYFT_DOWNLOAD_FILE" | sha256sum -c - || exit 1 && \
tar -xzf $SYFT_DOWNLOAD_FILE -C /usr/bin/ syft && \
rm $SYFT_DOWNLOAD_FILE

ARG GO_VERSION=go1.22.3
ARG GOLANG_DIST_SHA=8920ea521bad8f6b7bc377b4824982e011c19af27df88a815e3586ea895f1b36
Expand Down
2 changes: 2 additions & 0 deletions scripts/check-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ update_repo() {
}

update_golang
update_repo 'sigstore/cosign' 'cosign_checksums.txt' 'COSIGN_VERSION' 'COSIGN_SHA' 'cosign-linux-amd64$'
update_repo 'anchore/syft' 'syft_1.4.1_checksums.txt' 'SYFT_VERSION' 'SYFT_SHA' 'linux_amd64.tar.gz$'
update_repo 'goreleaser/goreleaser' 'checksums.txt' 'GORELEASER_VERSION' 'GORELEASER_SHA' 'Linux_x86_64.tar.gz$'
update_repo 'ko-build/ko' 'checksums.txt' 'KO_VERSION' 'KO_SHA' 'ko_Linux_x86_64.tar.gz$'
update_repo 'git-chglog/git-chglog' 'checksums.txt' 'GIT_CHGLOG_VERSION' 'GIT_CHGLOG_SHA' 'linux_amd64.tar.gz'
Expand Down

0 comments on commit 9768ae5

Please sign in to comment.