-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup release workflow for goreleaser (#26)
Signed-off-by: Tyler Auerbeck <[email protected]> Co-authored-by: Tyler Auerbeck <[email protected]>
- Loading branch information
1 parent
eca5ac4
commit 198d629
Showing
3 changed files
with
42 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json | ||
|
||
includes: | ||
- from_url: | ||
url: https://raw.githubusercontent.com/infratographer/release/main/goreleaser/base.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,10 @@ | ||
FROM golang:1.20.5 AS builder | ||
|
||
COPY . /src | ||
WORKDIR /src | ||
|
||
# Build the binary | ||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o bin/ipam-api . | ||
|
||
# Pass in name as --build-arg | ||
FROM gcr.io/distroless/static:nonroot | ||
# `nonroot` coming from distroless | ||
USER 65532:65532 | ||
|
||
COPY --from=builder /src/bin/ipam-api /ipam-api | ||
# Copy the binary that goreleaser built | ||
COPY ipam-api /ipam-api | ||
|
||
# Run the web service on container startup. | ||
ENTRYPOINT ["/ipam-api"] | ||
CMD ["serve"] | ||
CMD ["serve"] |