Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github Actions #25

Merged
merged 3 commits into from Dec 15, 2020
Merged

Github Actions #25

merged 3 commits into from Dec 15, 2020

Conversation

leetrout
Copy link
Contributor

Hey @bketelsen here's a very simple workflow to build 1.11-1.15. Earlier versions did not work due to an issue with x/term.

I removed vgo from the Dockerfiles but I did not add a workflow to integration / e2e test docker. Let me know if that is a blocker. Manual test results below just demonstrating it builds with these changes.

I updated the README to include a badge that will work once this is merged to master on your branch. Here's the badge from my fork:

Docker test

docker run -it check                            
2020/12/13 22:45:16 configdir is required
Full build output of (docker build -t check .)
docker build -t check .   
Sending build context to Docker daemon   2.48MB
Step 1/10 : FROM golang:1.15
 ---> 4c3ed2f0a91d
Step 2/10 : ADD . /go/src/github.com/bketelsen/captainhook
 ---> Using cache
 ---> 87bfb46a6ac9
Step 3/10 : WORKDIR /go/src/github.com/bketelsen/captainhook
 ---> Using cache
 ---> 33d445aed77e
Step 4/10 : RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o captainhook .
 ---> Using cache
 ---> e2d5db94f373
Step 5/10 : FROM alpine:latest
 ---> b14afc6dfb98
Step 6/10 : RUN apk --no-cache add ca-certificates
 ---> Using cache
 ---> 2369ef7f82c2
Step 7/10 : WORKDIR /root/
 ---> Using cache
 ---> 5f79b3ace557
Step 8/10 : COPY --from=0 /go/src/github.com/bketelsen/captainhook/captainhook .
 ---> Using cache
 ---> fe9f80160e1f
Step 9/10 : VOLUME /config
 ---> Using cache
 ---> 4e56ea8b1f66
Step 10/10 : CMD ["./captainhook"]
 ---> Using cache
 ---> 0bfc359136a9
Successfully built 0bfc359136a9
Successfully tagged check:latest
docker run -it multicheck
2020/12/13 22:42:13 configdir is required
Full build output of (docker build -t multicheck -f Dockerfile.multi .)
docker build -t multicheck -f Dockerfile.multi .
Sending build context to Docker daemon   2.48MB
Step 1/14 : FROM golang:1.15 as builder
 ---> 4c3ed2f0a91d
Step 2/14 : ADD . /go/src/github.com/bketelsen/captainhook
 ---> 87bfb46a6ac9
Step 3/14 : WORKDIR /go/src/github.com/bketelsen/captainhook
 ---> Running in 70a5c6a795b8
Removing intermediate container 70a5c6a795b8
 ---> 33d445aed77e
Step 4/14 : RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o captainhook .
 ---> Running in 9e362e906f13
go: downloading github.com/gorilla/mux v1.6.1
Removing intermediate container 9e362e906f13
 ---> e2d5db94f373
Step 5/14 : FROM alpine:latest as alpine
 ---> b14afc6dfb98
Step 6/14 : RUN apk --no-cache add ca-certificates
 ---> Using cache
 ---> 2369ef7f82c2
Step 7/14 : WORKDIR /root/
 ---> Using cache
 ---> 5f79b3ace557
Step 8/14 : COPY --from=builder /go/src/github.com/bketelsen/captainhook/captainhook .
 ---> Using cache
 ---> fe9f80160e1f
Step 9/14 : FROM scratch
 ---> 
Step 10/14 : COPY --from=alpine /root/captainhook /usr/bin/captainhook
 ---> Using cache
 ---> ca78b49cf4c6
Step 11/14 : COPY --from=alpine /etc/ssl/certs/ /etc/ssl/certs
 ---> Using cache
 ---> 4a744192e895
Step 12/14 : VOLUME /config
 ---> Using cache
 ---> 5fe459a8b704
Step 13/14 : ENTRYPOINT ["/usr/bin/captainhook"]
 ---> Running in 116ab77b83b7
Removing intermediate container 116ab77b83b7
 ---> f3aab4923aa4
Step 14/14 : CMD ["/usr/bin/captainhook"]
 ---> Running in 361dc463b2f0
Removing intermediate container 361dc463b2f0
 ---> ba6346f6f994
Successfully built ba6346f6f994
Successfully tagged multicheck:latest

Copy link
Owner

@bketelsen bketelsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

@bketelsen bketelsen merged commit 351e37b into bketelsen:master Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants