This repository was archived by the owner on Oct 14, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -63,12 +63,16 @@ jobs:
6363 cd operator/
6464 go fmt ./...
6565 go vet ./...
66+ - name : Parse Tag
67+ id : parse-tag
68+ run : echo ::set-output name=version::${GITHUB_REF#refs/*/}
6669 - name : " Build'n Push Operator"
6770 uses : docker/build-push-action@v1
6871 with :
6972 username : ${{ secrets.DOCKER_USERNAME }}
7073 password : ${{ secrets.DOCKER_PASSWORD }}
7174 repository : scbexperimental/operator
75+ build_args : VERSION=`${{ steps.parse-tag.outputs.version }}
7276 tag_with_ref : true
7377 tag_with_sha : true
7478 path : ./operator/
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ RUN go mod download
1313COPY main.go main.go
1414COPY apis/ apis/
1515COPY controllers/ controllers/
16+ COPY internal/ internal/
1617COPY utils/ utils/
1718
1819# Build
@@ -21,6 +22,11 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager
2122# Use distroless as minimal base image to package the manager binary
2223# Refer to https://github.com/GoogleContainerTools/distroless for more details
2324FROM gcr.io/distroless/static:nonroot
25+
26+ ARG VERSION=unkown
27+ ENV VERSION ENV ${BRANCH}
28+ ENV TELEMETRY_ENABLED "true"
29+
2430WORKDIR /
2531COPY --from=builder /workspace/manager .
2632USER nonroot:nonroot
You can’t perform that action at this time.
0 commit comments