From fe80830b35ae24421f82117793183a9ed725167f Mon Sep 17 00:00:00 2001 From: VishalVaibhav Date: Thu, 10 Feb 2022 22:08:03 +0530 Subject: [PATCH] chnaging dockerfile --- .github/workflows/release.yml | 2 ++ Dockerfile | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ed22e9e..f5623d2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,6 +9,8 @@ jobs: environment: deployment runs-on: ubuntu-latest steps: + - name: Check out the repo + uses: actions/checkout@v2 - name: Docker Login uses: docker/login-action@v1 with: diff --git a/Dockerfile b/Dockerfile index 01dd5a7..aa84fe8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,16 @@ +FROM golang:1.17-alpine as builder +WORKDIR /go/src/github.com/target/pull-request-code-coverage +COPY . . +ENV GO111MODULE=on +ENV CGO_ENABLED=0 +ENV GOOS=linux + +RUN apk add --no-cache git && \ + go build -a -installsuffix cgo -o bin/plugin + + FROM alpine:latest -COPY bin/plugin / +COPY --from=builder /go/src/github.com/target/pull-request-code-coverage/bin/plugin / RUN apk --no-cache add ca-certificates git bash openssh-client WORKDIR /root/ COPY scripts/start.sh /