File tree 2 files changed +20
-5
lines changed
2 files changed +20
-5
lines changed Original file line number Diff line number Diff line change 15
15
uses : actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
16
16
- name : Test
17
17
run : go test -mod=vendor ./...
18
+
19
+ build-container :
20
+ runs-on : ubuntu-latest
21
+ steps :
22
+ - name : Checkout code
23
+ uses : actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
24
+ - name : Set up Docker
25
+ uses : docker/setup-buildx-action@4b4e9c3e2d4531116a6f8ba8e71fc6e2cb6e6c8c # v2.5.0
26
+ - name : Build
27
+ uses : docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 # v4.0.0
28
+ with :
29
+ push : false
30
+ tags : pdsync
Original file line number Diff line number Diff line change 1
- FROM golang:alpine as cert-store
2
- RUN apk --no-cache add ca-certificates
1
+ FROM amd64/golang:1.20.3-alpine3.17 as builder
3
2
4
- FROM scratch
3
+ WORKDIR /usr/src/pdsync
5
4
6
- COPY --from=cert-store /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
7
- COPY ./pdsync /
5
+ COPY . .
6
+ RUN CGO_ENABLED=0 go build -mod vendor -o /pdsync
7
+
8
+ FROM gcr.io/distroless/static-debian11 as runner
9
+ COPY --from=builder /pdsync /
8
10
ENTRYPOINT ["/pdsync" ]
You can’t perform that action at this time.
0 commit comments