diff --git a/.github/workflows/cpr.yml b/.github/workflows/cpr.yml index c4f443e..8c26cb3 100644 --- a/.github/workflows/cpr.yml +++ b/.github/workflows/cpr.yml @@ -12,5 +12,4 @@ jobs: uses: ./ with: access_token: ${{ secrets.ACCESS_TOKEN }} - edit: true - verbose: true + diff --git a/Dockerfile b/Dockerfile index 55fe066..75c9cfe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.18 +FROM golang:1.18 as builder WORKDIR /ci @@ -9,8 +9,16 @@ RUN go mod download COPY . . -RUN go build -a -o cpr . +ENV GOCACHE=/root/.cache/go-build +RUN --mount=type=cache,target="/root/.cache/go-build" go build -o cpr . -RUN chmod +x /ci/cpr +FROM ubuntu:22.04 -CMD ["/ci/cpr"] +RUN mkdir /app +WORKDIR /app + +RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates + +COPY --from=builder /ci/cpr /app/cpr + +ENTRYPOINT ["/app/cpr"]