diff --git a/Dockerfile b/Dockerfile index 0e88704..658a736 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,15 +8,11 @@ RUN apk add --no-cache git ca-certificates WORKDIR /src -# Copy *both* dependency files first so Docker-layer caching works -COPY go.mod go.sum ./ -RUN go mod download - -# Bring in the rest of the source +# Bring in the source (vendor dir included) COPY . . -# Build static binary -RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /out/action ./main.go +# Build static binary using vendored dependencies +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -mod=vendor -o /out/action ./main.go ######################## # — Runtime stage — diff --git a/main.go b/main.go index 988461c..45f9509 100644 --- a/main.go +++ b/main.go @@ -7,7 +7,6 @@ import ( "log" "os" "os/exec" - "reflect" "strconv" "strings"