refactor: fmt, update dockerfiles

This commit is contained in:
soulteary 2023-01-09 22:23:14 +08:00
parent 750af322a8
commit 990048122c
No known key found for this signature in database
GPG key ID: 8107DBA6BC84D986
3 changed files with 5 additions and 4 deletions

View file

@ -1,10 +1,10 @@
FROM golang:1.19.4-bullseye AS Builder
ENV GOPROXY=https://goproxy.cn
ENV CGO_ENABLED=0
WORKDIR /app
COPY . .
RUN go mod download -x
RUN GOOS=linux GOARCH=amd64 go build -o webhook
RUN GOOS=linux GOARCH=amd64 go build -ldflags "-w -s" -o webhook
FROM debian:stretch
LABEL maintainer "soulteary <soulteary@gmail.com>"
COPY --from=builder /app/webhook /bin/

View file

@ -1,9 +1,10 @@
FROM golang:1.19.4-alpine3.16 AS Builder
ENV GOPROXY=https://goproxy.cn
ENV CGO_ENABLED=0
WORKDIR /app
COPY . .
RUN go mod download -x
RUN GOOS=linux GOARCH=amd64 go build -o webhook
RUN GOOS=linux GOARCH=amd64 go build -ldflags "-w -s" -o webhook
FROM alpine:3.16
LABEL maintainer "soulteary <soulteary@gmail.com>"

View file

@ -611,7 +611,7 @@ type Hook struct {
ResponseMessage string `json:"response-message,omitempty"`
ResponseHeaders ResponseHeaders `json:"response-headers,omitempty"`
CaptureCommandOutput bool `json:"include-command-output-in-response,omitempty"`
StreamCommandOutput bool `json:"stream-command-output,omitempty"`
StreamCommandOutput bool `json:"stream-command-output,omitempty"`
CaptureCommandOutputOnError bool `json:"include-command-output-in-response-on-error,omitempty"`
PassEnvironmentToCommand []Argument `json:"pass-environment-to-command,omitempty"`
PassArgumentsToCommand []Argument `json:"pass-arguments-to-command,omitempty"`