Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/docker/Dockerfile.ci
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
ARG GO_VERSION=1.25
FROM golang:${GO_VERSION}-alpine AS cpm-builder
RUN apk add --no-cache git
RUN git clone --depth 1 https://github.com/CognitiveOS-Project/cpm.git /cpm
WORKDIR /cpm
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o /usr/local/bin/cpm ./cmd/cpm

FROM golang:${GO_VERSION}-alpine

ARG WORKDIR=.
WORKDIR /src
COPY ${WORKDIR} .

RUN apk add --no-cache jq
RUN go install github.com/CognitiveOS-Project/cpm/cmd/cpm@latest
COPY --from=cpm-builder /usr/local/bin/cpm /usr/local/bin/cpm
RUN mkdir -p /out

RUN cpm pack
RUN cpm info --json > /out/pkg.json
RUN cp *.cgp /out/

FROM scratch
COPY --from=0 /out /out
FROM alpine
COPY --from=1 /out /out
Loading