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 /