Skip to content

Commit

Permalink
Merge branch 'feature/restructuring' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
UlrichEckhardt committed Mar 25, 2024
2 parents 8536d10 + 5bd8307 commit e3e5efe
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ README.md
# vendored Go packages
vendor/

# built executable
api-broker-prototype
# built executables
cmd/broker/broker

# local overrides for docker-compose.yml
docker-compose.override.yml
26 changes: 15 additions & 11 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,20 @@ jobs:
run: |
go get -v -t -d ./...
- name: Build
run: go build -v .

- name: Format
run: go fmt ./... && git diff --quiet
run: |
go fmt ./...
git diff --quiet
- name: Lint
run: go vet ./...

- name: Test
run: go test -v ./...

- name: Build Broker
run: go build -C cmd/broker -v


build-1_21:
name: Build with Go 1.21
Expand All @@ -51,18 +53,20 @@ jobs:
run: |
go get -v -t -d ./...
- name: Build
run: go build -v .

- name: Format
run: go fmt ./... && git diff --quiet
run: |
go fmt ./...
git diff --quiet
- name: Lint
run: go vet ./...

- name: Test
run: go test -v ./...

- name: Build Broker
run: go build -C cmd/broker -v


build-1_22:
name: Build with Go 1.22
Expand All @@ -82,9 +86,6 @@ jobs:
run: |
go get -v -t -d ./...
- name: Build
run: go build -v .

- name: Format
run: |
go fmt ./...
Expand All @@ -95,3 +96,6 @@ jobs:

- name: Test
run: go test -v ./...

- name: Build Broker
run: go build -C cmd/broker -v
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ RUN go mod download
# copy remaining files and build executable
COPY . .

# build statically
RUN CGO_ENABLED=0 go build
# build executables statically
RUN CGO_ENABLED=0 go build -C cmd/broker


# start a new image, it will only contain the executable
FROM scratch
# start a new image, it will only contain the broker executable
FROM scratch AS broker

COPY --from=build /go/api-broker-prototype/api-broker-prototype /
ENTRYPOINT ["/api-broker-prototype"]
COPY --from=build /go/api-broker-prototype/cmd/broker/broker /
ENTRYPOINT ["/broker"]
File renamed without changes.

0 comments on commit e3e5efe

Please sign in to comment.