-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c225e31
commit 35a0bfe
Showing
8 changed files
with
102 additions
and
32 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM golang:1.21-bullseye AS builder | ||
|
||
WORKDIR /go/src/github.com/emmanuelgautier/giteway | ||
|
||
COPY go.mod go.mod | ||
COPY go.sum go.sum | ||
|
||
ENV CGO_ENABLED 0 | ||
ENV GO111MODULE on | ||
|
||
RUN go mod download | ||
|
||
COPY . . | ||
|
||
RUN go build -o /usr/bin/giteway . | ||
|
||
FROM gcr.io/distroless/static-debian11:nonroot AS runner | ||
|
||
COPY --from=builder --chown=nonroot:nonroot /usr/bin/giteway /usr/bin/giteway | ||
|
||
ENTRYPOINT ["giteway", "serve"] | ||
CMD ["giteway"] |
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,6 @@ | ||
FROM gcr.io/distroless/static-debian11:nonroot | ||
|
||
COPY --chown=nonroot:nonroot giteway /usr/bin/giteway | ||
|
||
ENTRYPOINT ["giteway", "serve"] | ||
CMD ["giteway"] |
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,22 @@ | ||
name: SLSA Go releaser | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [created] | ||
|
||
permissions: read-all | ||
|
||
env: | ||
GO_VERSION: '1.21.1' | ||
|
||
jobs: | ||
release: | ||
permissions: | ||
id-token: write | ||
contents: write | ||
actions: read | ||
|
||
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected] | ||
with: | ||
go-version: ${{ env.GO_VERSION }} |
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,24 @@ | ||
# If you prefer the allow list template instead of the deny list, see community template: | ||
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore | ||
# | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
|
||
# Go workspace file | ||
go.work | ||
|
||
dist/ | ||
giteway |
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,24 @@ | ||
before: | ||
hooks: | ||
- go mod tidy | ||
- go generate ./... | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
|
||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- "^docs:" | ||
- "^test:" | ||
|
||
dockers: | ||
- image_templates: | ||
- "ghcr.io/thegalactiks/giteway:{{ .Tag }}" | ||
- "ghcr.io/thegalactiks/giteway:v{{ .Major }}" | ||
- "ghcr.io/thegalactiks/giteway:v{{ .Major }}.{{ .Minor }}" | ||
- "ghcr.io/thegalactiks/giteway:latest" | ||
dockerfile: .docker/Dockerfile-goreleaser |
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