steps: build: image: golang:1.22 commands: - go mod edit -dropreplace gitea.maximumdirect.net/ejr/feedkit - mkdir -p dist - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags "-s -w" -o dist/weatherfeeder ./cmd/weatherfeeder - | cat > Dockerfile.ci <<'EOF' FROM alpine:3.19 RUN adduser -D -H app \ && apk add --no-cache ca-certificates COPY dist/weatherfeeder /usr/local/bin/weatherfeeder USER app ENTRYPOINT ["/usr/local/bin/weatherfeeder"] EOF publish: image: plugins/docker privileged: true settings: registry: harbor.maximumdirect.net repo: harbor.maximumdirect.net/build/weatherfeeder tags: - ${CI_COMMIT_SHA} - latest dockerfile: Dockerfile.ci context: . depends_on: - build when: branch: main event: push