Skip to content
Snippets Groups Projects
Commit 41c7d3a3 authored by Will McCutchen's avatar Will McCutchen
Browse files

Build docker image in CI

parent 22de8317
No related branches found
No related tags found
No related merge requests found
......@@ -29,11 +29,14 @@ jobs:
- name: Build
run: make build
- name: Build docker image
run: make image
- name: Lint
run: make lint
- name: Test
run: git show && make testci
run: git show --stat && make testci
- name: Code coverage
uses: codecov/codecov-action@v1
......
# syntax = docker/dockerfile:1-experimental
FROM golang:1.16
WORKDIR /go/src/github.com/mccutchen/go-httpbin
......@@ -6,7 +7,8 @@ WORKDIR /go/src/github.com/mccutchen/go-httpbin
RUN cd /tmp && go get -u github.com/kevinburke/go-bindata/...
COPY . .
RUN make build buildtests
RUN --mount=type=cache,id=gobuild,target=/root/.cache/go-build \
make build buildtests
FROM gcr.io/distroless/base
COPY --from=0 /go/src/github.com/mccutchen/go-httpbin/dist/go-httpbin* /bin/
......
......@@ -142,7 +142,7 @@ gcloud-auth:
# docker images
# =============================================================================
image:
docker build -t $(DOCKER_TAG_DOCKERHUB) .
DOCKER_BUILDKIT=1 docker build -t $(DOCKER_TAG_DOCKERHUB) .
imagepush: image
docker push $(DOCKER_TAG_DOCKERHUB)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment