Skip to content

Commit

Permalink
feat: put atest-collector into the image
Browse files Browse the repository at this point in the history
  • Loading branch information
LinuxSuRen committed Jun 8, 2023
1 parent ec32ff3 commit 2f21232
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
tags:
- '*'
branches:
- master

env:
REGISTRY: ghcr.io
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ FROM golang:1.18 AS builder
WORKDIR /workspace
COPY cmd/ cmd/
COPY pkg/ pkg/
COPY extensions/ extensions/
COPY sample/ sample/
COPY go.mod go.mod
COPY go.sum go.sum
Expand All @@ -12,6 +13,7 @@ COPY LICENSE LICENSE

RUN go mod download
RUN CGO_ENABLE=0 go build -ldflags "-w -s" -o atest .
RUN CGO_ENABLE=0 go build -ldflags "-w -s" -o atest-collector extensions/collector/main.go

FROM ubuntu:23.04

Expand All @@ -27,6 +29,7 @@ LABEL "maintainer"="Rick <[email protected]>"
LABEL "Name"="API testing"

COPY --from=builder /workspace/atest /usr/local/bin/atest
COPY --from=builder /workspace/atest /usr/local/bin/atest-collector
COPY --from=builder /workspace/LICENSE /LICENSE
COPY --from=builder /workspace/README.md /README.md

Expand Down

0 comments on commit 2f21232

Please sign in to comment.