diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a6cc4e4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM golang AS builder +WORKDIR /go/src/sparkling-dependencies +ADD . ./ +RUN CGO_ENABLED=0 go build -ldflags '-extldflags "-static"' -o ./compiled github.com/madetech/sparkling-dependencies/cmd/action + +FROM scratch +COPY --from=builder /go/src/sparkling-dependencies/compiled/action /action +ENTRYPOINT ["/action"] diff --git a/cmd/action/main.go b/cmd/action/main.go new file mode 100644 index 0000000..344d51f --- /dev/null +++ b/cmd/action/main.go @@ -0,0 +1,5 @@ +package main + +func main() { + println("Hello world") +} diff --git a/compiled/.keep b/compiled/.keep new file mode 100644 index 0000000..e69de29 diff --git a/go.mod b/go.mod index ba251a6..4462c5c 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module sparkling-dependencies +module github.com/madetech/sparkling-dependencies go 1.19