From 174f7087a7543e3f86459966e8dc891a556d0762 Mon Sep 17 00:00:00 2001 From: Cian Hatton Date: Mon, 30 Jan 2023 13:51:53 +0000 Subject: [PATCH] chore: update dockerfile for v6.1.0 branch (#3070) --- .github/workflows/release.yml | 3 ++- .github/workflows/test.yml | 7 +++++++ Dockerfile | 12 +++++++++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 06b11e26d46..5edc1f40272 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -51,4 +51,5 @@ jobs: context: . push: true tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} + build-args: | + IBC_GO_VERSION="${{ github.ref_name }}" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dabb6af1178..70a8a93bbb1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -52,6 +52,13 @@ jobs: - name: Build run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make build + docker-build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Docker Build + run: docker build . --no-cache --build-arg IBC_GO_VERSION=v6.1.0 + split-test-files: runs-on: ubuntu-latest steps: diff --git a/Dockerfile b/Dockerfile index a193f54906e..e9dc7fb7973 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,13 @@ -FROM golang:1.18 as builder +FROM golang:1.19 as builder + +ARG IBC_GO_VERSION ENV GOPATH="" ENV GOMODULE="on" +# ensure the ibc go version is being specified for this image. +RUN test -n "${IBC_GO_VERSION}" + COPY go.mod . COPY go.sum . @@ -14,10 +19,15 @@ ADD LICENSE LICENSE COPY Makefile . + RUN make build FROM ubuntu:20.04 +ARG IBC_GO_VERSION + +LABEL "org.cosmos.ibc-go" "${IBC_GO_VERSION}" + COPY --from=builder /go/build/simd /bin/simd ENTRYPOINT ["simd"]