feat: add linter configs, Dockerfile, CI/CD pipeline
- .golangci.yml — 50+ linters enabled - .yamllint — yaml lint rules - cicd.yaml — CI/CD with lint-go (golangci, staticcheck, gosec, revive), lint-yaml, build+test, publish - Dockerfile — multi-stage scratch build - go vet passes clean
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
FROM golang:1.23-alpine AS builder
|
||||
RUN apk add --no-cache git ca-certificates
|
||||
WORKDIR /src
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o /gosleep-timer .
|
||||
|
||||
FROM scratch
|
||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||
COPY --from=builder /gosleep-timer /gosleep-timer
|
||||
ENTRYPOINT ["/gosleep-timer"]
|
||||
Reference in New Issue
Block a user