-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
21 lines (15 loc) · 824 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM golang:1.23-alpine as build
# renovate: datasource=github-releases depName=codecov/uploader
ARG UPLOADER_VERSION=v0.8.0
WORKDIR /src
COPY . .
RUN apk add -q --no-cache ca-certificates curl
RUN go build -ldflags '-s -w -extldflags "-static"' -o plugin-codecov
RUN if [ $(arch) = "aarch64" ] ; then curl -sLf https://github.com/codecov/uploader/releases/download/${UPLOADER_VERSION}/codecov-aarch64 -o codecov; fi
RUN if [ $(arch) = "x86_64" ] ; then curl -sLf https://github.com/codecov/uploader/releases/download/${UPLOADER_VERSION}/codecov-linux -o codecov; fi
RUN chmod +x codecov plugin-codecov
FROM scratch
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=build src/codecov /bin/
COPY --from=build src/plugin-codecov /bin/
ENTRYPOINT ["/bin/plugin-codecov"]