File tree Expand file tree Collapse file tree 4 files changed +85
-15
lines changed Expand file tree Collapse file tree 4 files changed +85
-15
lines changed Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on :
4
+ push :
5
+ branches : [ master ]
6
+ pull_request :
7
+ branches : [ master ]
8
+
9
+ jobs :
10
+
11
+ test :
12
+ name : Test
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+
16
+ - name : Set up Go 1.x
17
+ uses : actions/setup-go@v2
18
+ with :
19
+ go-version : ^1.13
20
+ id : go
21
+
22
+ - name : Check out code into the Go module directory
23
+ uses : actions/checkout@v2
24
+
25
+ - name : Cache go module cache
26
+ id : cache-go-mod
27
+ uses : actions/cache@v2
28
+ with :
29
+ path : ~/go/pkg/mod
30
+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
31
+ restore-keys : |
32
+ ${{ runner.os }}-go-
33
+
34
+ - name : Get dependencies
35
+ run : go mod download
36
+
37
+ - name : Build
38
+ run : make build
39
+
40
+ - name : Lint
41
+ uses : golangci/golangci-lint-action@v1
42
+ with :
43
+ # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
44
+ version : v1.27
45
+
46
+ - name : Test
47
+ run : make test
48
+
49
+ - uses : shogo82148/actions-goveralls@v1
50
+ with :
51
+ path-to-profile : cover.out
52
+
53
+ deploy :
54
+ name : Deploy
55
+ needs : test
56
+ if : github.event_name == 'push' && github.ref == 'refs/heads/master'
57
+ runs-on : ubuntu-latest
58
+ steps :
59
+
60
+ - name : Check out code into the Go module directory
61
+ uses : actions/checkout@v2
62
+
63
+ - name : Push helm-operator image to Quay
64
+ uses : docker/build-push-action@v1
65
+ with :
66
+ username : ${{ secrets.QUAY_USERNAME }}
67
+ password : ${{ secrets.QUAY_PASSWORD }}
68
+ registry : quay.io
69
+ repository : joelanford/helm-operator
70
+ tags : master
71
+
72
+ - name : Push example nginx-operator image to Quay
73
+ uses : docker/build-push-action@v1
74
+ with :
75
+ path : example/
76
+ username : ${{ secrets.QUAY_USERNAME }}
77
+ password : ${{ secrets.QUAY_PASSWORD }}
78
+ registry : quay.io
79
+ repository : joelanford/nginx-operator
80
+ tags : latest
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -15,13 +15,13 @@ COPY pkg/ pkg/
15
15
COPY version/ version/
16
16
17
17
# Build
18
- RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go
18
+ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o helm-operator main.go
19
19
20
20
# Use distroless as minimal base image to package the manager binary
21
21
# Refer to https://github.com/GoogleContainerTools/distroless for more details
22
22
FROM gcr.io/distroless/static:nonroot
23
23
WORKDIR /
24
- COPY --from=builder /workspace/manager .
24
+ COPY --from=builder /workspace/helm-operator .
25
25
USER nonroot:nonroot
26
26
27
- ENTRYPOINT ["/manager " ]
27
+ ENTRYPOINT ["/helm-operator " ]
Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ test: fmt vet testbin
17
17
go test -race -covermode atomic -coverprofile cover.out ./...
18
18
19
19
# Build manager binary
20
- manager : fmt vet
21
- go build -o bin/manager main.go
20
+ build : fmt vet
21
+ go build -o bin/helm-operator main.go
22
22
23
23
# Run go fmt against code
24
24
fmt :
You can’t perform that action at this time.
0 commit comments