diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 91681a7..cfdc9bd 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,5 +1,20 @@ +before: + hooks: + - go mod tidy + +gomod: + proxy: true + builds: - - skip: true + - env: + - CGO_ENABLED=0 + main: ./cmd/ctfd-setup + mod_timestamp: "{{ .CommitTimestamp }}" + goos: + - linux + goarch: + - amd64 + binary: "{{ .ProjectName }}" dockers: - image_templates: diff --git a/Dockerfile b/Dockerfile index ac488f4..2a25042 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,3 @@ -# Build stage -FROM golang:1.22.2@sha256:c4fb952e712efd8f787bcd8e53fd66d1d83b7dc26adabc218e9eac1dbf776bdf AS builder - -WORKDIR /go/src -COPY go.mod go.sum ./ -RUN go mod download - -COPY . . - -ENV CGO_ENABLED=0 -RUN go build -o /go/bin/ctfd-setup cmd/ctfd-setup/main.go - - - -# Prod stage FROM scratch -COPY --from=builder /go/bin/ctfd-setup /ctfd-setup +COPY ctfd-setup / ENTRYPOINT [ "/ctfd-setup" ]