mirror of
https://github.com/adnanh/webhook.git
synced 2025-08-02 07:50:32 +00:00
refactor: fmt, update dockerfiles
This commit is contained in:
parent
750af322a8
commit
990048122c
3 changed files with 5 additions and 4 deletions
|
@ -1,10 +1,10 @@
|
||||||
FROM golang:1.19.4-bullseye AS Builder
|
FROM golang:1.19.4-bullseye AS Builder
|
||||||
ENV GOPROXY=https://goproxy.cn
|
ENV GOPROXY=https://goproxy.cn
|
||||||
|
ENV CGO_ENABLED=0
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN go mod download -x
|
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
|
FROM debian:stretch
|
||||||
LABEL maintainer "soulteary <soulteary@gmail.com>"
|
LABEL maintainer "soulteary <soulteary@gmail.com>"
|
||||||
COPY --from=builder /app/webhook /bin/
|
COPY --from=builder /app/webhook /bin/
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
FROM golang:1.19.4-alpine3.16 AS Builder
|
FROM golang:1.19.4-alpine3.16 AS Builder
|
||||||
ENV GOPROXY=https://goproxy.cn
|
ENV GOPROXY=https://goproxy.cn
|
||||||
|
ENV CGO_ENABLED=0
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN go mod download -x
|
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
|
FROM alpine:3.16
|
||||||
LABEL maintainer "soulteary <soulteary@gmail.com>"
|
LABEL maintainer "soulteary <soulteary@gmail.com>"
|
||||||
|
|
|
@ -611,7 +611,7 @@ type Hook struct {
|
||||||
ResponseMessage string `json:"response-message,omitempty"`
|
ResponseMessage string `json:"response-message,omitempty"`
|
||||||
ResponseHeaders ResponseHeaders `json:"response-headers,omitempty"`
|
ResponseHeaders ResponseHeaders `json:"response-headers,omitempty"`
|
||||||
CaptureCommandOutput bool `json:"include-command-output-in-response,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"`
|
CaptureCommandOutputOnError bool `json:"include-command-output-in-response-on-error,omitempty"`
|
||||||
PassEnvironmentToCommand []Argument `json:"pass-environment-to-command,omitempty"`
|
PassEnvironmentToCommand []Argument `json:"pass-environment-to-command,omitempty"`
|
||||||
PassArgumentsToCommand []Argument `json:"pass-arguments-to-command,omitempty"`
|
PassArgumentsToCommand []Argument `json:"pass-arguments-to-command,omitempty"`
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue